Version 1.2.0-dev.3.0

svn merge -r 32096:32187 https://dart.googlecode.com/svn/branches/bleeding_edge trunk

git-svn-id: http://dart.googlecode.com/svn/trunk@32191 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 05c9a1d..b4c10ce 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -13715,13 +13715,13 @@
   }
 
   Object visitClassTypeAlias(ClassTypeAlias node) {
+    if (node.abstractKeyword != null) {
+      _writer.print("abstract ");
+    }
     _writer.print("class ");
     visit(node.name);
     visit(node.typeParameters);
     _writer.print(" = ");
-    if (node.abstractKeyword != null) {
-      _writer.print("abstract ");
-    }
     visit(node.superclass);
     visit3(" ", node.withClause);
     visit3(" ", node.implementsClause);
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 3dc64a0..4ecc945 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -1870,6 +1870,11 @@
    * Return an array containing all of the properties declared by this directive.
    */
   List<AngularPropertyElement> get properties;
+
+  /**
+   * Checks if this directive is implemented by the class with given name.
+   */
+  bool isClass(String name);
 }
 
 /**
@@ -6354,6 +6359,11 @@
 
   List<AngularPropertyElement> get properties => _properties;
 
+  bool isClass(String name) {
+    Element enclosing = enclosingElement;
+    return enclosing is ClassElement && enclosing.name == name;
+  }
+
   /**
    * Set an array containing all of the properties declared by this directive.
    *
@@ -6515,6 +6525,19 @@
 }
 
 /**
+ * Combination of [IsTagSelectorElementImpl] and [HasAttributeSelectorElementImpl].
+ */
+class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
+  final String tagName;
+
+  final String attributeName;
+
+  IsTagHasAttributeSelectorElementImpl(this.tagName, this.attributeName) : super(null, -1);
+
+  bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attributeName) != null;
+}
+
+/**
  * Implementation of [AngularSelectorElement] based on tag name.
  */
 class IsTagSelectorElementImpl extends AngularSelectorElementImpl {
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index b6bd31c..1b226dc 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -5347,7 +5347,9 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the source
           // will be re-verified using the up-to-date sources.
           //
-          dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.INVALID);
+          //          dartCopy.setState(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.INVALID);
+          dartCopy.invalidateAllInformation();
+          dartCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5446,7 +5448,9 @@
               // The analysis was performed on out-of-date sources. Mark the cache so that the sources
               // will be re-analyzed using the up-to-date sources.
               //
-              dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.INVALID);
+              //              dartCopy.setState(DartEntry.HINTS, librarySource, CacheState.INVALID);
+              dartCopy.invalidateAllInformation();
+              dartCopy.modificationTime = sourceTime;
             } else {
               //
               // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5549,7 +5553,9 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          dartCopy.recordParseNotInProcess();
+          //          dartCopy.recordParseNotInProcess();
+          dartCopy.invalidateAllInformation();
+          dartCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5625,15 +5631,17 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          if (identical(htmlCopy.getState(SourceEntry.LINE_INFO), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.INVALID);
-          }
-          if (identical(htmlCopy.getState(HtmlEntry.PARSED_UNIT), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.INVALID);
-          }
-          if (identical(htmlCopy.getState(HtmlEntry.REFERENCED_LIBRARIES), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.INVALID);
-          }
+          //          if (htmlCopy.getState(SourceEntry.LINE_INFO) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.INVALID);
+          //          }
+          //          if (htmlCopy.getState(HtmlEntry.PARSED_UNIT) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.INVALID);
+          //          }
+          //          if (htmlCopy.getState(HtmlEntry.REFERENCED_LIBRARIES) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.INVALID);
+          //          }
+          htmlCopy.invalidateAllInformation();
+          htmlCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5705,15 +5713,17 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          if (identical(htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
-          }
-          if (identical(htmlCopy.getState(HtmlEntry.ELEMENT), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
-          }
-          if (identical(htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
-          }
+          //          if (htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
+          //          }
+          //          if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
+          //          }
+          //          if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
+          //          }
+          htmlCopy.invalidateAllInformation();
+          htmlCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5784,7 +5794,9 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          dartCopy.recordDependencyNotInProcess();
+          //          dartCopy.recordDependencyNotInProcess();
+          dartCopy.invalidateAllInformation();
+          dartCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5856,9 +5868,11 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          if (identical(dartCopy.getState(DartEntry.RESOLVED_UNIT), CacheState.IN_PROCESS)) {
-            dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.INVALID);
-          }
+          //          if (dartCopy.getState(DartEntry.RESOLVED_UNIT) == CacheState.IN_PROCESS) {
+          //            dartCopy.setState(DartEntry.RESOLVED_UNIT, librarySource, CacheState.INVALID);
+          //          }
+          dartCopy.invalidateAllInformation();
+          dartCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -5931,12 +5945,14 @@
           // The analysis was performed on out-of-date sources. Mark the cache so that the sources
           // will be re-analyzed using the up-to-date sources.
           //
-          if (identical(htmlCopy.getState(HtmlEntry.ELEMENT), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
-          }
-          if (identical(htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS), CacheState.IN_PROCESS)) {
-            htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
-          }
+          //          if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
+          //          }
+          //          if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
+          //            htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
+          //          }
+          htmlCopy.invalidateAllInformation();
+          htmlCopy.modificationTime = sourceTime;
         } else {
           //
           // We could not determine whether the sources were up-to-date or out-of-date. Mark the
@@ -7877,7 +7893,7 @@
         return super.visitXmlTagNode(node);
       }
       // process node in separate name scope
-      _nameScope = _resolver.pushNameScope();
+      pushNameScope();
       try {
         parseEmbeddedExpressions3(node);
         // apply processors
@@ -7891,7 +7907,7 @@
         // process children
         return super.visitXmlTagNode(node);
       } finally {
-        _resolver.popNameScope();
+        popNameScope();
       }
     } finally {
       _isAngular = wasAngular;
@@ -7971,6 +7987,14 @@
 
   Expression parseExpression3(Token token) => ht.HtmlParser.parseEmbeddedExpression(_source, token, _errorListener);
 
+  void popNameScope() {
+    _nameScope = _resolver.popNameScope();
+  }
+
+  void pushNameScope() {
+    _nameScope = _resolver.pushNameScope();
+  }
+
   /**
    * Reports given [ErrorCode] at the given [ASTNode].
    */
@@ -8039,6 +8063,13 @@
     InheritanceManager inheritanceManager = new InheritanceManager(_libraryElement);
     _resolver = new ResolverVisitor.con2(_libraryElement, _source, _typeProvider, inheritanceManager, _errorListener);
     _topNameScope = _resolver.pushNameScope();
+    // add Scope variables - no type, no location, just to avoid warnings
+    {
+      Type2 type = _typeProvider.dynamicType;
+      _topNameScope.define(createLocalVariable2(type, "\$id"));
+      _topNameScope.define(createLocalVariable2(type, "\$parent"));
+      _topNameScope.define(createLocalVariable2(type, "\$root"));
+    }
   }
 
   /**
@@ -8334,15 +8365,31 @@
         attribute.element = property;
         // resolve if binding
         if (property.propertyKind != AngularPropertyKind.ATTR) {
-          Expression expression = parseExpression(resolver, attribute);
-          resolver.resolveNode(expression);
-          setExpression(attribute, expression);
+          resolver.pushNameScope();
+          try {
+            onNgEventDirective(resolver);
+            Expression expression = parseExpression(resolver, attribute);
+            resolver.resolveNode(expression);
+            setExpression(attribute, expression);
+          } finally {
+            resolver.popNameScope();
+          }
         }
       }
     }
   }
 
   bool canApply(ht.XmlTagNode node) => _element.selector.apply(node);
+
+  /**
+   * Support for <code>$event</code> variable in <code>NgEventDirective</code>.
+   */
+  void onNgEventDirective(AngularHtmlUnitResolver resolver) {
+    if (_element.isClass("NgEventDirective")) {
+      Type2 dynamicType = resolver.typeProvider.dynamicType;
+      resolver.defineVariable(resolver.createLocalVariable2(dynamicType, "\$event"));
+    }
+  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 366162f..1c9e0cf 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -152,12 +152,25 @@
    * cannot parse.
    */
   static AngularSelectorElement parseSelector(int offset, String text) {
+    // [attribute]
     if (StringUtilities.startsWithChar(text, 0x5B) && StringUtilities.endsWithChar(text, 0x5D)) {
       int nameOffset = offset + "[".length;
       String attributeName = text.substring(1, text.length - 1);
       // TODO(scheglov) report warning if there are spaces between [ and identifier
       return new HasAttributeSelectorElementImpl(attributeName, nameOffset);
     }
+    // tag[attribute]
+    if (StringUtilities.endsWithChar(text, 0x5D)) {
+      int index = StringUtilities.indexOf1(text, 0, 0x5B);
+      if (index != -1) {
+        String tagName = text.substring(0, index);
+        String attributeName = text.substring(index + 1, text.length - 1);
+        if (StringUtilities.isTagName(tagName)) {
+          return new IsTagHasAttributeSelectorElementImpl(tagName, attributeName);
+        }
+      }
+    }
+    // tag
     if (StringUtilities.isTagName(text)) {
       return new IsTagSelectorElementImpl(text, offset);
     }
@@ -398,9 +411,11 @@
   void parseNgComponent() {
     bool isValid = true;
     // publishAs
-    if (!hasStringArgument(_PUBLISH_AS)) {
-      reportErrorForAnnotation(AngularCode.MISSING_PUBLISH_AS, []);
-      isValid = false;
+    String name = null;
+    int nameOffset = -1;
+    if (hasStringArgument(_PUBLISH_AS)) {
+      name = getStringArgument(_PUBLISH_AS);
+      nameOffset = getStringArgumentOffset(_PUBLISH_AS);
     }
     // selector
     AngularSelectorElement selector = null;
@@ -416,30 +431,28 @@
       }
     }
     // templateUrl
-    if (!hasStringArgument(_TEMPLATE_URL)) {
-      reportErrorForAnnotation(AngularCode.MISSING_TEMPLATE_URL, []);
-      isValid = false;
+    String templateUri = null;
+    int templateUriOffset = -1;
+    if (hasStringArgument(_TEMPLATE_URL)) {
+      templateUri = getStringArgument(_TEMPLATE_URL);
+      templateUriOffset = getStringArgumentOffset(_TEMPLATE_URL);
     }
     // cssUrl
-    if (!hasStringArgument(_CSS_URL)) {
-      reportErrorForAnnotation(AngularCode.MISSING_CSS_URL, []);
-      isValid = false;
+    String styleUri = null;
+    int styleUriOffset = -1;
+    if (hasStringArgument(_CSS_URL)) {
+      styleUri = getStringArgument(_CSS_URL);
+      styleUriOffset = getStringArgumentOffset(_CSS_URL);
     }
     // create
     if (isValid) {
-      String name = getStringArgument(_PUBLISH_AS);
-      int nameOffset = getStringArgumentOffset(_PUBLISH_AS);
-      String templateUri = getStringArgument(_TEMPLATE_URL);
-      int templateUriOffset = getStringArgumentOffset(_TEMPLATE_URL);
-      String styleUri = getStringArgument(_CSS_URL);
-      int styleUriOffset = getStringArgumentOffset(_CSS_URL);
       AngularComponentElementImpl element = new AngularComponentElementImpl(name, nameOffset);
       element.selector = selector;
       element.templateUri = templateUri;
       element.templateUriOffset = templateUriOffset;
       // resolve template URI
       // TODO(scheglov) resolve to HtmlElement to allow F3 ?
-      {
+      if (templateUri != null) {
         try {
           parseUriWithException(templateUri);
           // TODO(scheglov) think if there is better solution
@@ -448,9 +461,14 @@
           }
           Source templateSource = _context.sourceFactory.resolveUri(_source, templateUri);
           if (templateSource == null || !templateSource.exists()) {
+            templateSource = _context.sourceFactory.resolveUri(_source, "package:${templateUri}");
+          }
+          if (templateSource == null || !templateSource.exists()) {
             reportErrorForArgument(_TEMPLATE_URL, AngularCode.URI_DOES_NOT_EXIST, [templateUri]);
           }
-          element.templateSource = templateSource;
+          if (AnalysisEngine.isHtmlFileName(templateUri)) {
+            element.templateSource = templateSource;
+          }
         } on URISyntaxException catch (exception) {
           reportErrorForArgument(_TEMPLATE_URL, AngularCode.INVALID_URI, [templateUri]);
         }
@@ -571,11 +589,12 @@
       String fieldName = spec.substring(fieldNameOffset);
       fieldNameOffset += specLiteral.valueOffset;
       // prepare field
-      FieldElement field = _classElement.getField(fieldName);
-      if (field == null) {
+      PropertyAccessorElement setter = _classElement.type.lookUpSetter(fieldName, _classElement.library);
+      if (setter == null) {
         reportError2(fieldNameOffset, fieldName.length, AngularCode.INVALID_PROPERTY_FIELD, [fieldName]);
         continue;
       }
+      FieldElement field = setter.variable as FieldElement;
       // add property
       AngularPropertyElementImpl property = new AngularPropertyElementImpl(name, nameOffset);
       property.field = field;
@@ -749,6 +768,12 @@
   List<FunctionTypeImpl> _functionTypesToFix = null;
 
   /**
+   * A table mapping field names to field elements for the fields defined in the current class, or
+   * `null` if we are not in the scope of a class.
+   */
+  Map<String, FieldElement> _fieldMap;
+
+  /**
    * Initialize a newly created element builder to build the elements for a compilation unit.
    *
    * @param initialHolder the element holder associated with the compilation unit being built
@@ -788,7 +813,23 @@
     ElementHolder holder = new ElementHolder();
     _isValidMixin = true;
     _functionTypesToFix = new List<FunctionTypeImpl>();
-    visitChildren(holder, node);
+    //
+    // Process field declarations before constructors and methods so that field formal parameters
+    // can be correctly resolved to their fields.
+    //
+    ElementHolder previousHolder = _currentHolder;
+    _currentHolder = holder;
+    try {
+      List<ClassMember> nonFields = new List<ClassMember>();
+      node.visitChildren(new UnifyingASTVisitor_ElementBuilder_visitClassDeclaration(this, nonFields));
+      buildFieldMap(holder.fieldsWithoutFlushing);
+      int count = nonFields.length;
+      for (int i = 0; i < count; i++) {
+        nonFields[i].accept(this);
+      }
+    } finally {
+      _currentHolder = previousHolder;
+    }
     SimpleIdentifier className = node.name;
     ClassElementImpl element = new ClassElementImpl(className);
     List<TypeParameterElement> typeParameters = holder.typeParameters;
@@ -817,6 +858,7 @@
     _functionTypesToFix = null;
     _currentHolder.addType(element);
     className.staticElement = element;
+    _fieldMap = null;
     holder.validate();
     return null;
   }
@@ -898,10 +940,15 @@
 
   Object visitDefaultFormalParameter(DefaultFormalParameter node) {
     ElementHolder holder = new ElementHolder();
-    SimpleIdentifier parameterName = node.parameter.identifier;
+    NormalFormalParameter normalParameter = node.parameter;
+    SimpleIdentifier parameterName = normalParameter.identifier;
     ParameterElementImpl parameter;
-    if (node.parameter is FieldFormalParameter) {
+    if (normalParameter is FieldFormalParameter) {
       parameter = new DefaultFieldFormalParameterElementImpl(parameterName);
+      FieldElement field = _fieldMap == null ? null : _fieldMap[parameterName.name];
+      if (field != null) {
+        (parameter as DefaultFieldFormalParameterElementImpl).field = field;
+      }
     } else {
       parameter = new DefaultParameterElementImpl(parameterName);
     }
@@ -925,7 +972,7 @@
     setParameterVisibleRange(node, parameter);
     _currentHolder.addParameter(parameter);
     parameterName.staticElement = parameter;
-    node.parameter.accept(this);
+    normalParameter.accept(this);
     holder.validate();
     return null;
   }
@@ -944,10 +991,14 @@
   Object visitFieldFormalParameter(FieldFormalParameter node) {
     if (node.parent is! DefaultFormalParameter) {
       SimpleIdentifier parameterName = node.identifier;
+      FieldElement field = _fieldMap == null ? null : _fieldMap[parameterName.name];
       FieldFormalParameterElementImpl parameter = new FieldFormalParameterElementImpl(parameterName);
       parameter.const3 = node.isConst;
       parameter.final2 = node.isFinal;
       parameter.parameterKind = node.kind;
+      if (field != null) {
+        parameter.field = field;
+      }
       _currentHolder.addParameter(parameter);
       parameterName.staticElement = parameter;
     }
@@ -1327,6 +1378,21 @@
   }
 
   /**
+   * Build the table mapping field names to field elements for the fields defined in the current
+   * class.
+   *
+   * @param fields the field elements defined in the current class
+   */
+  void buildFieldMap(List<FieldElement> fields) {
+    _fieldMap = new Map<String, FieldElement>();
+    int count = fields.length;
+    for (int i = 0; i < count; i++) {
+      FieldElement field = fields[i];
+      _fieldMap[field.name] = field;
+    }
+  }
+
+  /**
    * Creates the [ConstructorElement]s array with the single default constructor element.
    *
    * @param interfaceType the interface type for which to create a default constructor
@@ -1439,6 +1505,26 @@
   }
 }
 
+class UnifyingASTVisitor_ElementBuilder_visitClassDeclaration extends UnifyingASTVisitor<Object> {
+  final ElementBuilder ElementBuilder_this;
+
+  List<ClassMember> nonFields;
+
+  UnifyingASTVisitor_ElementBuilder_visitClassDeclaration(this.ElementBuilder_this, this.nonFields) : super();
+
+  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+    nonFields.add(node);
+    return null;
+  }
+
+  Object visitMethodDeclaration(MethodDeclaration node) {
+    nonFields.add(node);
+    return null;
+  }
+
+  Object visitNode(ASTNode node) => node.accept(ElementBuilder_this);
+}
+
 /**
  * Instances of the class `ElementHolder` hold on to elements created while traversing an AST
  * structure so that they can be accessed when creating their enclosing element.
@@ -1593,6 +1679,14 @@
     return result;
   }
 
+  List<FieldElement> get fieldsWithoutFlushing {
+    if (_fields == null) {
+      return FieldElementImpl.EMPTY_ARRAY;
+    }
+    List<FieldElement> result = new List.from(_fields);
+    return result;
+  }
+
   List<FunctionElement> get functions {
     if (_functions == null) {
       return FunctionElementImpl.EMPTY_ARRAY;
@@ -5273,25 +5367,19 @@
     ClassElement classElement = _resolver.enclosingClass;
     if (classElement != null) {
       FieldElement fieldElement = classElement.getField(fieldName);
-      if (fieldElement == null) {
+      if (fieldElement == null || fieldElement.isSynthetic) {
         _resolver.reportError8(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
       } else {
         ParameterElement parameterElement = node.element;
         if (parameterElement is FieldFormalParameterElementImpl) {
           FieldFormalParameterElementImpl fieldFormal = parameterElement;
-          fieldFormal.field = fieldElement;
           Type2 declaredType = fieldFormal.type;
           Type2 fieldType = fieldElement.type;
-          if (node.type == null) {
-            fieldFormal.type = fieldType;
-          }
           if (fieldElement.isSynthetic) {
             _resolver.reportError8(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
           } else if (fieldElement.isStatic) {
             _resolver.reportError8(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, node, [fieldName]);
           } else if (declaredType != null && fieldType != null && !declaredType.isAssignableTo(fieldType)) {
-            // TODO(brianwilkerson) We should implement a displayName() method for types that will
-            // work nicely with function types and then use that below.
             _resolver.reportError8(StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, node, [declaredType.displayName, fieldType.displayName]);
           }
         } else {
@@ -5845,13 +5933,6 @@
   }
 
   Object visitTypeParameter(TypeParameter node) {
-    TypeName bound = node.bound;
-    if (bound != null) {
-      TypeParameterElementImpl typeParameter = node.name.staticElement as TypeParameterElementImpl;
-      if (typeParameter != null) {
-        typeParameter.bound = bound.type;
-      }
-    }
     setMetadata(node.element, node);
     return null;
   }
@@ -8200,17 +8281,6 @@
     _directiveUris[directive] = uriContent;
     uriContent = Uri.encodeFull(uriContent);
     if (directive is ImportDirective && uriContent.startsWith(_DART_EXT_SCHEME)) {
-      String uriBase = uriContent.substring(_DART_EXT_SCHEME.length);
-      Source source = _analysisContext.sourceFactory.resolveUri(librarySource, "${uriBase}.dll");
-      if (source == null || !source.exists()) {
-        source = _analysisContext.sourceFactory.resolveUri(librarySource, "${uriBase}.so");
-        if (source == null || !source.exists()) {
-          source = _analysisContext.sourceFactory.resolveUri(librarySource, "${uriBase}.dylib");
-          if (source == null || !source.exists()) {
-            _errorListener.onError(new AnalysisError.con2(librarySource, uriLiteral.offset, uriLiteral.length, CompileTimeErrorCode.URI_DOES_NOT_EXIST, [uriContent]));
-          }
-        }
-      }
       _libraryElement.hasExtUri2 = true;
       return null;
     }
@@ -10772,9 +10842,12 @@
 
   /**
    * Replaces the current [Scope] with the enclosing [Scope].
+   *
+   * @return the enclosing [Scope].
    */
-  void popNameScope() {
+  Scope popNameScope() {
     _nameScope = _nameScope.enclosingScope;
+    return _nameScope;
   }
 
   /**
@@ -10785,7 +10858,7 @@
   Scope pushNameScope() {
     Scope newScope = new EnclosedScope(_nameScope);
     _nameScope = newScope;
-    return newScope;
+    return _nameScope;
   }
 
   /**
@@ -10835,7 +10908,7 @@
     Scope outerScope = _nameScope;
     try {
       _nameScope = new ClassScope(_nameScope, node.element);
-      super.visitClassDeclaration(node);
+      visitClassDeclarationInScope(node);
     } finally {
       _nameScope = outerScope;
     }
@@ -11122,6 +11195,10 @@
     }
   }
 
+  void visitClassDeclarationInScope(ClassDeclaration node) {
+    super.visitClassDeclaration(node);
+  }
+
   /**
    * Visit the given statement after it's scope has been created. This replaces the normal call to
    * the inherited visit method so that ResolverVisitor can intervene when type propagation is
@@ -13831,22 +13908,6 @@
     return null;
   }
 
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
-    super.visitDefaultFormalParameter(node);
-    //    Expression defaultValue = node.getDefaultValue();
-    //    if (defaultValue != null) {
-    //      Type valueType = getType(defaultValue);
-    //      Type parameterType = getType(node.getParameter());
-    //      if (!valueType.isAssignableTo(parameterType)) {
-    // TODO(brianwilkerson) Determine whether this is really an error. I can't find in the spec
-    // anything that says it is, but a side comment from Gilad states that it should be a static
-    // warning.
-    //        resolver.reportError(ResolverErrorCode.?, defaultValue);
-    //      }
-    //    }
-    return null;
-  }
-
   Object visitFieldFormalParameter(FieldFormalParameter node) {
     super.visitFieldFormalParameter(node);
     Element element = node.identifier.staticElement;
@@ -13857,8 +13918,13 @@
         Type2 type;
         TypeName typeName = node.type;
         if (typeName == null) {
-          // TODO(brianwilkerson) Find the field's declaration and use it's type.
           type = _dynamicType;
+          if (parameter is FieldFormalParameterElement) {
+            FieldElement fieldElement = (parameter as FieldFormalParameterElement).field;
+            if (fieldElement != null) {
+              type = fieldElement.type;
+            }
+          }
         } else {
           type = getType3(typeName);
         }
@@ -14170,6 +14236,18 @@
     return null;
   }
 
+  Object visitTypeParameter(TypeParameter node) {
+    super.visitTypeParameter(node);
+    TypeName bound = node.bound;
+    if (bound != null) {
+      TypeParameterElementImpl typeParameter = node.name.staticElement as TypeParameterElementImpl;
+      if (typeParameter != null) {
+        typeParameter.bound = bound.type;
+      }
+    }
+    return null;
+  }
+
   Object visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     Type2 declaredType;
@@ -14211,6 +14289,19 @@
     return null;
   }
 
+  void visitClassDeclarationInScope(ClassDeclaration node) {
+    //
+    // Process field declarations before constructors and methods so that the types of field formal
+    // parameters can be correctly resolved.
+    //
+    List<ClassMember> nonFields = new List<ClassMember>();
+    node.visitChildren(new UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this, nonFields));
+    int count = nonFields.length;
+    for (int i = 0; i < count; i++) {
+      nonFields[i].accept(this);
+    }
+  }
+
   /**
    * Given a type name representing the return type of a function, compute the return type of the
    * function.
@@ -14618,6 +14709,26 @@
   RedirectingConstructorKind(String name, int ordinal) : super(name, ordinal);
 }
 
+class UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope extends UnifyingASTVisitor<Object> {
+  final TypeResolverVisitor TypeResolverVisitor_this;
+
+  List<ClassMember> nonFields;
+
+  UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this.TypeResolverVisitor_this, this.nonFields) : super();
+
+  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+    nonFields.add(node);
+    return null;
+  }
+
+  Object visitMethodDeclaration(MethodDeclaration node) {
+    nonFields.add(node);
+    return null;
+  }
+
+  Object visitNode(ASTNode node) => node.accept(TypeResolverVisitor_this);
+}
+
 /**
  * Instances of the class `VariableResolverVisitor` are used to resolve
  * [SimpleIdentifier]s to local variables and formal parameters.
diff --git a/pkg/analyzer/lib/src/services/formatter_impl.dart b/pkg/analyzer/lib/src/services/formatter_impl.dart
index 50962f3..1693dd6 100644
--- a/pkg/analyzer/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer/lib/src/services/formatter_impl.dart
@@ -426,7 +426,6 @@
 
   visitAssertStatement(AssertStatement node) {
     token(node.keyword);
-    space();
     token(node.leftParenthesis);
     visit(node.condition);
     token(node.rightParenthesis);
@@ -477,7 +476,10 @@
   visitCascadeExpression(CascadeExpression node) {
     visit(node.target);
     indent(2);
-    newlines();
+    // Single cascades do not force a linebreak (dartbug.com/16384)
+    if (node.cascadeSections.length > 1) {
+      newlines();
+    }
     visitNodes(node.cascadeSections, separatedBy: newlines);
     unindent(2);
   }
@@ -1000,12 +1002,14 @@
     modifier(node.constKeyword);
     visitNode(node.typeArguments, followedBy: space);
     token(node.leftBracket);
-    newlines();
-    indent();
-    visitCommaSeparatedNodes(node.entries, followedBy: newlines);
-    optionalTrailingComma(node.rightBracket);
-    unindent();
-    newlines();
+    if (!node.entries.isEmpty) {
+      newlines();
+      indent();
+      visitCommaSeparatedNodes(node.entries, followedBy: newlines);
+      optionalTrailingComma(node.rightBracket);
+      unindent();
+      newlines();
+    }
     token(node.rightBracket);
   }
 
@@ -1197,8 +1201,10 @@
     visitNodes(node.labels, separatedBy: space, followedBy: space);
     token(node.keyword);
     token(node.colon);
-    space();
-    visitNodes(node.statements, separatedBy: space);
+    newlines();
+    indent();
+    visitNodes(node.statements, separatedBy: newlines);
+    unindent();
   }
 
   visitSwitchStatement(SwitchStatement node) {
diff --git a/pkg/analyzer/lib/src/services/writer.dart b/pkg/analyzer/lib/src/services/writer.dart
index c1d5f5d..78b837d 100644
--- a/pkg/analyzer/lib/src/services/writer.dart
+++ b/pkg/analyzer/lib/src/services/writer.dart
@@ -232,7 +232,7 @@
     }
   }
 
-  bool fits(LineText text) => length + text.length < maxLength;
+  bool fits(LineText text) => length + text.length <= maxLength;
 
   int get length => start.value.length + buffer.length;
 
@@ -257,11 +257,15 @@
 
   String toString() => value;
 
-  int get length => value.length;
+  int get length => lengthLessNewlines(value);
 
   void addTo(Chunk chunk) {
     chunk.buffer.write(value);
   }
+
+  int lengthLessNewlines(String str) =>
+      str.endsWith('\n') ? str.length - 1 : str.length;
+
 }
 
 
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index fcc8c01..d0f4cb2 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.11.9
+version: 0.11.10
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: http://www.dartlang.org
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index 182d035..198d57d 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -2161,11 +2161,11 @@
   }
 
   void test_visitClassTypeAlias_abstract() {
-    assertSource("class C = abstract S with M1;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
+    assertSource("abstract class C = S with M1;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
   }
 
   void test_visitClassTypeAlias_abstract_implements() {
-    assertSource("class C = abstract S with M1 implements I;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+    assertSource("abstract class C = S with M1 implements I;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
   }
 
   void test_visitClassTypeAlias_generic() {
@@ -2181,11 +2181,11 @@
   }
 
   void test_visitClassTypeAlias_parameters_abstract() {
-    assertSource("class C<E> = abstract S with M1;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
+    assertSource("abstract class C<E> = S with M1;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
   }
 
   void test_visitClassTypeAlias_parameters_abstract_implements() {
-    assertSource("class C<E> = abstract S with M1 implements I;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+    assertSource("abstract class C<E> = S with M1 implements I;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
   }
 
   void test_visitClassTypeAlias_parameters_implements() {
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 40f52db..065a1ac 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -2902,9 +2902,7 @@
   void test_nativeFunctionBodyInNonSDKCode_function() {
     Source source = addSource(EngineTestCase.createSource(["import 'dart-ext:x';", "int m(a) native 'string';"]));
     resolve(source);
-    // There's no good way to fool the file system into believing that the referenced file exists,
-    // but the test still verifies that the native function body is allowed because of the import.
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    assertNoErrors(source);
   }
 
   void test_newWithAbstractClass_factory() {
@@ -12885,12 +12883,6 @@
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
-  void test_uriDoesNotExist_nativeLibrary() {
-    Source source = addSource(EngineTestCase.createSource(["import 'dart-ext:lib';"]));
-    resolve(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
-  }
-
   void test_uriDoesNotExist_part() {
     Source source = addSource(EngineTestCase.createSource(["part 'unknown.dart';"]));
     resolve(source);
@@ -14297,10 +14289,6 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_uriDoesNotExist_import);
       });
-      _ut.test('test_uriDoesNotExist_nativeLibrary', () {
-        final __test = new CompileTimeErrorCodeTest();
-        runJUnitTest(__test, __test.test_uriDoesNotExist_nativeLibrary);
-      });
       _ut.test('test_uriDoesNotExist_part', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_uriDoesNotExist_part);
@@ -14948,12 +14936,16 @@
   }
 
   void test_visitFieldFormalParameter() {
-    InterfaceType intType = _typeProvider.intType;
     String fieldName = "f";
+    InterfaceType intType = _typeProvider.intType;
+    FieldElementImpl fieldElement = ElementFactory.fieldElement(fieldName, false, false, false, intType);
     ClassElementImpl classA = ElementFactory.classElement2("A", []);
-    classA.fields = <FieldElement> [ElementFactory.fieldElement(fieldName, false, false, false, intType)];
+    classA.fields = <FieldElement> [fieldElement];
     FieldFormalParameter parameter = ASTFactory.fieldFormalParameter3(fieldName);
-    parameter.identifier.staticElement = ElementFactory.fieldFormalParameter(parameter.identifier);
+    FieldFormalParameterElementImpl parameterElement = ElementFactory.fieldFormalParameter(parameter.identifier);
+    parameterElement.field = fieldElement;
+    parameterElement.type = intType;
+    parameter.identifier.staticElement = parameterElement;
     resolveInClass(parameter, classA);
     JUnitTestCase.assertSame(intType, parameter.element.type);
   }
diff --git a/pkg/analyzer/test/services/data/cu_tests.data b/pkg/analyzer/test/services/data/cu_tests.data
index f4505d5..9091620 100644
--- a/pkg/analyzer/test/services/data/cu_tests.data
+++ b/pkg/analyzer/test/services/data/cu_tests.data
@@ -186,4 +186,18 @@
 }
 
 void setX(x) {
+}
+>>> dartbug.com/16405
+class ContactImpulse {
+  List<double> normalImpulses = new List<double>(Settings.MAX_MANIFOLD_POINTS);
+  List<double> tangentImpulses = new List<double>(Settings.MAX_MANIFOLD_POINTS);
+
+  ContactImpulse();
+}
+<<<
+class ContactImpulse {
+  List<double> normalImpulses = new List<double>(Settings.MAX_MANIFOLD_POINTS);
+  List<double> tangentImpulses = new List<double>(Settings.MAX_MANIFOLD_POINTS);
+
+  ContactImpulse();
 }
\ No newline at end of file
diff --git a/pkg/analyzer/test/services/data/stmt_tests.data b/pkg/analyzer/test/services/data/stmt_tests.data
index 9b3ba46..7557479 100644
--- a/pkg/analyzer/test/services/data/stmt_tests.data
+++ b/pkg/analyzer/test/services/data/stmt_tests.data
@@ -45,4 +45,56 @@
 <<<<
 blah() {
   print('blah blah blah blah blah blah blah blah blah blah blah blah blah blah $foo');
-}
\ No newline at end of file
+}
+>>>
+assert(false);
+<<<
+assert(false);
+>>> dartbug.com/16384
+fish() => []..add(1)..add(2);
+<<<
+fish() => []
+    ..add(1)
+    ..add(2);
+>>>
+fish() => []..add(1);
+<<<
+fish() => []..add(1);
+>>> dartbug.com/16382
+var m = { };
+<<<
+var m = {};
+>>>
+var m = {};
+<<<
+var m = {};
+>>> Indent cases two spaces and case bodies four spaces (dartbug.com/16406)
+switches() {
+  switch (fruit) {
+    case 'apple':
+    print('delish');
+    break;
+
+    case 'durian':
+    print('stinky');
+    break;
+    default:
+  print('nevermind');
+  break;
+  }
+}
+<<<
+switches() {
+  switch (fruit) {
+    case 'apple':
+      print('delish');
+      break;
+
+    case 'durian':
+      print('stinky');
+      break;
+    default:
+      print('nevermind');
+      break;
+  }
+}
diff --git a/pkg/barback/lib/src/package_graph.dart b/pkg/barback/lib/src/package_graph.dart
index c2e1a8e..ce49459 100644
--- a/pkg/barback/lib/src/package_graph.dart
+++ b/pkg/barback/lib/src/package_graph.dart
@@ -58,7 +58,7 @@
 
   /// The stream of [LogEntry] objects used to report transformer log entries.
   Stream<LogEntry> get log => _logController.stream;
-  final _logController = new StreamController<LogEntry>.broadcast();
+  final _logController = new StreamController<LogEntry>.broadcast(sync: true);
 
   /// The most recent error emitted from a cascade's result stream.
   ///
diff --git a/pkg/barback/pubspec.yaml b/pkg/barback/pubspec.yaml
index 28dd215..803e405 100644
--- a/pkg/barback/pubspec.yaml
+++ b/pkg/barback/pubspec.yaml
@@ -8,7 +8,7 @@
 # When the minor version of this is upgraded, you *must* update that version
 # number in pub to stay in sync with this. New patch versions are considered
 # backwards compatible, and pub will allow later patch versions automatically.
-version: 0.11.0+2
+version: 0.11.0+3
 
 author: "Dart Team <misc@dartlang.org>"
 homepage: http://www.dartlang.org
diff --git a/pkg/collection/lib/wrappers.dart b/pkg/collection/lib/wrappers.dart
index 1097c3e..b15a6bd 100644
--- a/pkg/collection/lib/wrappers.dart
+++ b/pkg/collection/lib/wrappers.dart
@@ -26,7 +26,7 @@
  * iterable object.
  */
 class DelegatingIterable<E> implements Iterable<E> {
-  Iterable<E> _base;
+  final Iterable<E> _base;
 
   /**
    * Create a wrapper that forwards operations to [base].
@@ -295,7 +295,8 @@
  * map object.
  */
 class DelegatingMap<K, V> implements Map<K, V> {
-  Map<K, V> _base;
+  final Map<K, V> _base;
+
   DelegatingMap(Map<K, V> base) : _base = base;
 
   V operator [](Object key) => _base[key];
diff --git a/pkg/collection/pubspec.yaml b/pkg/collection/pubspec.yaml
index 6f9d290..4c3c8f0 100644
--- a/pkg/collection/pubspec.yaml
+++ b/pkg/collection/pubspec.yaml
@@ -1,5 +1,5 @@
 name: collection
-version: 0.9.1
+version: 0.9.1-dev+1
 author: Dart Team <misc@dartlang.org>
 description: Collections and utilities functions and classes related to collections.
 homepage: http://www.dartlang.org
diff --git a/pkg/custom_element/lib/custom-elements.debug.js b/pkg/custom_element/lib/custom-elements.debug.js
index 3860932a..fe98775 100644
--- a/pkg/custom_element/lib/custom-elements.debug.js
+++ b/pkg/custom_element/lib/custom-elements.debug.js
@@ -56,555 +56,11 @@
   })();
 }
 
-(function(global) {
-
-  var registrationsTable = new WeakMap();
-
-  // We use setImmediate or postMessage for our future callback.
-  var setImmediate = window.msSetImmediate;
-
-  // Use post message to emulate setImmediate.
-  if (!setImmediate) {
-    var setImmediateQueue = [];
-    var sentinel = String(Math.random());
-    window.addEventListener('message', function(e) {
-      if (e.data === sentinel) {
-        var queue = setImmediateQueue;
-        setImmediateQueue = [];
-        queue.forEach(function(func) {
-          func();
-        });
-      }
-    });
-    setImmediate = function(func) {
-      setImmediateQueue.push(func);
-      window.postMessage(sentinel, '*');
-    };
-  }
-
-  // This is used to ensure that we never schedule 2 callas to setImmediate
-  var isScheduled = false;
-
-  // Keep track of observers that needs to be notified next time.
-  var scheduledObservers = [];
-
-  /**
-   * Schedules |dispatchCallback| to be called in the future.
-   * @param {MutationObserver} observer
-   */
-  function scheduleCallback(observer) {
-    scheduledObservers.push(observer);
-    if (!isScheduled) {
-      isScheduled = true;
-      setImmediate(dispatchCallbacks);
-    }
-  }
-
-  function wrapIfNeeded(node) {
-    return window.ShadowDOMPolyfill &&
-        window.ShadowDOMPolyfill.wrapIfNeeded(node) ||
-        node;
-  }
-
-  function dispatchCallbacks() {
-    // http://dom.spec.whatwg.org/#mutation-observers
-
-    isScheduled = false; // Used to allow a new setImmediate call above.
-
-    var observers = scheduledObservers;
-    scheduledObservers = [];
-    // Sort observers based on their creation UID (incremental).
-    observers.sort(function(o1, o2) {
-      return o1.uid_ - o2.uid_;
-    });
-
-    var anyNonEmpty = false;
-    observers.forEach(function(observer) {
-
-      // 2.1, 2.2
-      var queue = observer.takeRecords();
-      // 2.3. Remove all transient registered observers whose observer is mo.
-      removeTransientObserversFor(observer);
-
-      // 2.4
-      if (queue.length) {
-        observer.callback_(queue, observer);
-        anyNonEmpty = true;
-      }
-    });
-
-    // 3.
-    if (anyNonEmpty)
-      dispatchCallbacks();
-  }
-
-  function removeTransientObserversFor(observer) {
-    observer.nodes_.forEach(function(node) {
-      var registrations = registrationsTable.get(node);
-      if (!registrations)
-        return;
-      registrations.forEach(function(registration) {
-        if (registration.observer === observer)
-          registration.removeTransientObservers();
-      });
-    });
-  }
-
-  /**
-   * This function is used for the "For each registered observer observer (with
-   * observer's options as options) in target's list of registered observers,
-   * run these substeps:" and the "For each ancestor ancestor of target, and for
-   * each registered observer observer (with options options) in ancestor's list
-   * of registered observers, run these substeps:" part of the algorithms. The
-   * |options.subtree| is checked to ensure that the callback is called
-   * correctly.
-   *
-   * @param {Node} target
-   * @param {function(MutationObserverInit):MutationRecord} callback
-   */
-  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
-    for (var node = target; node; node = node.parentNode) {
-      var registrations = registrationsTable.get(node);
-
-      if (registrations) {
-        for (var j = 0; j < registrations.length; j++) {
-          var registration = registrations[j];
-          var options = registration.options;
-
-          // Only target ignores subtree.
-          if (node !== target && !options.subtree)
-            continue;
-
-          var record = callback(options);
-          if (record)
-            registration.enqueue(record);
-        }
-      }
-    }
-  }
-
-  var uidCounter = 0;
-
-  /**
-   * The class that maps to the DOM MutationObserver interface.
-   * @param {Function} callback.
-   * @constructor
-   */
-  function JsMutationObserver(callback) {
-    this.callback_ = callback;
-    this.nodes_ = [];
-    this.records_ = [];
-    this.uid_ = ++uidCounter;
-  }
-
-  JsMutationObserver.prototype = {
-    observe: function(target, options) {
-      target = wrapIfNeeded(target);
-
-      // 1.1
-      if (!options.childList && !options.attributes && !options.characterData ||
-
-          // 1.2
-          options.attributeOldValue && !options.attributes ||
-
-          // 1.3
-          options.attributeFilter && options.attributeFilter.length &&
-              !options.attributes ||
-
-          // 1.4
-          options.characterDataOldValue && !options.characterData) {
-
-        throw new SyntaxError();
-      }
-
-      var registrations = registrationsTable.get(target);
-      if (!registrations)
-        registrationsTable.set(target, registrations = []);
-
-      // 2
-      // If target's list of registered observers already includes a registered
-      // observer associated with the context object, replace that registered
-      // observer's options with options.
-      var registration;
-      for (var i = 0; i < registrations.length; i++) {
-        if (registrations[i].observer === this) {
-          registration = registrations[i];
-          registration.removeListeners();
-          registration.options = options;
-          break;
-        }
-      }
-
-      // 3.
-      // Otherwise, add a new registered observer to target's list of registered
-      // observers with the context object as the observer and options as the
-      // options, and add target to context object's list of nodes on which it
-      // is registered.
-      if (!registration) {
-        registration = new Registration(this, target, options);
-        registrations.push(registration);
-        this.nodes_.push(target);
-      }
-
-      registration.addListeners();
-    },
-
-    disconnect: function() {
-      this.nodes_.forEach(function(node) {
-        var registrations = registrationsTable.get(node);
-        for (var i = 0; i < registrations.length; i++) {
-          var registration = registrations[i];
-          if (registration.observer === this) {
-            registration.removeListeners();
-            registrations.splice(i, 1);
-            // Each node can only have one registered observer associated with
-            // this observer.
-            break;
-          }
-        }
-      }, this);
-      this.records_ = [];
-    },
-
-    takeRecords: function() {
-      var copyOfRecords = this.records_;
-      this.records_ = [];
-      return copyOfRecords;
-    }
-  };
-
-  /**
-   * @param {string} type
-   * @param {Node} target
-   * @constructor
-   */
-  function MutationRecord(type, target) {
-    this.type = type;
-    this.target = target;
-    this.addedNodes = [];
-    this.removedNodes = [];
-    this.previousSibling = null;
-    this.nextSibling = null;
-    this.attributeName = null;
-    this.attributeNamespace = null;
-    this.oldValue = null;
-  }
-
-  function copyMutationRecord(original) {
-    var record = new MutationRecord(original.type, original.target);
-    record.addedNodes = original.addedNodes.slice();
-    record.removedNodes = original.removedNodes.slice();
-    record.previousSibling = original.previousSibling;
-    record.nextSibling = original.nextSibling;
-    record.attributeName = original.attributeName;
-    record.attributeNamespace = original.attributeNamespace;
-    record.oldValue = original.oldValue;
-    return record;
-  };
-
-  // We keep track of the two (possibly one) records used in a single mutation.
-  var currentRecord, recordWithOldValue;
-
-  /**
-   * Creates a record without |oldValue| and caches it as |currentRecord| for
-   * later use.
-   * @param {string} oldValue
-   * @return {MutationRecord}
-   */
-  function getRecord(type, target) {
-    return currentRecord = new MutationRecord(type, target);
-  }
-
-  /**
-   * Gets or creates a record with |oldValue| based in the |currentRecord|
-   * @param {string} oldValue
-   * @return {MutationRecord}
-   */
-  function getRecordWithOldValue(oldValue) {
-    if (recordWithOldValue)
-      return recordWithOldValue;
-    recordWithOldValue = copyMutationRecord(currentRecord);
-    recordWithOldValue.oldValue = oldValue;
-    return recordWithOldValue;
-  }
-
-  function clearRecords() {
-    currentRecord = recordWithOldValue = undefined;
-  }
-
-  /**
-   * @param {MutationRecord} record
-   * @return {boolean} Whether the record represents a record from the current
-   * mutation event.
-   */
-  function recordRepresentsCurrentMutation(record) {
-    return record === recordWithOldValue || record === currentRecord;
-  }
-
-  /**
-   * Selects which record, if any, to replace the last record in the queue.
-   * This returns |null| if no record should be replaced.
-   *
-   * @param {MutationRecord} lastRecord
-   * @param {MutationRecord} newRecord
-   * @param {MutationRecord}
-   */
-  function selectRecord(lastRecord, newRecord) {
-    if (lastRecord === newRecord)
-      return lastRecord;
-
-    // Check if the the record we are adding represents the same record. If
-    // so, we keep the one with the oldValue in it.
-    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))
-      return recordWithOldValue;
-
-    return null;
-  }
-
-  /**
-   * Class used to represent a registered observer.
-   * @param {MutationObserver} observer
-   * @param {Node} target
-   * @param {MutationObserverInit} options
-   * @constructor
-   */
-  function Registration(observer, target, options) {
-    this.observer = observer;
-    this.target = target;
-    this.options = options;
-    this.transientObservedNodes = [];
-  }
-
-  Registration.prototype = {
-    enqueue: function(record) {
-      var records = this.observer.records_;
-      var length = records.length;
-
-      // There are cases where we replace the last record with the new record.
-      // For example if the record represents the same mutation we need to use
-      // the one with the oldValue. If we get same record (this can happen as we
-      // walk up the tree) we ignore the new record.
-      if (records.length > 0) {
-        var lastRecord = records[length - 1];
-        var recordToReplaceLast = selectRecord(lastRecord, record);
-        if (recordToReplaceLast) {
-          records[length - 1] = recordToReplaceLast;
-          return;
-        }
-      } else {
-        scheduleCallback(this.observer);
-      }
-
-      records[length] = record;
-    },
-
-    addListeners: function() {
-      this.addListeners_(this.target);
-    },
-
-    addListeners_: function(node) {
-      var options = this.options;
-      if (options.attributes)
-        node.addEventListener('DOMAttrModified', this, true);
-
-      if (options.characterData)
-        node.addEventListener('DOMCharacterDataModified', this, true);
-
-      if (options.childList)
-        node.addEventListener('DOMNodeInserted', this, true);
-
-      if (options.childList || options.subtree)
-        node.addEventListener('DOMNodeRemoved', this, true);
-    },
-
-    removeListeners: function() {
-      this.removeListeners_(this.target);
-    },
-
-    removeListeners_: function(node) {
-      var options = this.options;
-      if (options.attributes)
-        node.removeEventListener('DOMAttrModified', this, true);
-
-      if (options.characterData)
-        node.removeEventListener('DOMCharacterDataModified', this, true);
-
-      if (options.childList)
-        node.removeEventListener('DOMNodeInserted', this, true);
-
-      if (options.childList || options.subtree)
-        node.removeEventListener('DOMNodeRemoved', this, true);
-    },
-
-    /**
-     * Adds a transient observer on node. The transient observer gets removed
-     * next time we deliver the change records.
-     * @param {Node} node
-     */
-    addTransientObserver: function(node) {
-      // Don't add transient observers on the target itself. We already have all
-      // the required listeners set up on the target.
-      if (node === this.target)
-        return;
-
-      this.addListeners_(node);
-      this.transientObservedNodes.push(node);
-      var registrations = registrationsTable.get(node);
-      if (!registrations)
-        registrationsTable.set(node, registrations = []);
-
-      // We know that registrations does not contain this because we already
-      // checked if node === this.target.
-      registrations.push(this);
-    },
-
-    removeTransientObservers: function() {
-      var transientObservedNodes = this.transientObservedNodes;
-      this.transientObservedNodes = [];
-
-      transientObservedNodes.forEach(function(node) {
-        // Transient observers are never added to the target.
-        this.removeListeners_(node);
-
-        var registrations = registrationsTable.get(node);
-        for (var i = 0; i < registrations.length; i++) {
-          if (registrations[i] === this) {
-            registrations.splice(i, 1);
-            // Each node can only have one registered observer associated with
-            // this observer.
-            break;
-          }
-        }
-      }, this);
-    },
-
-    handleEvent: function(e) {
-      // Stop propagation since we are managing the propagation manually.
-      // This means that other mutation events on the page will not work
-      // correctly but that is by design.
-      e.stopImmediatePropagation();
-
-      switch (e.type) {
-        case 'DOMAttrModified':
-          // http://dom.spec.whatwg.org/#concept-mo-queue-attributes
-
-          var name = e.attrName;
-          var namespace = e.relatedNode.namespaceURI;
-          var target = e.target;
-
-          // 1.
-          var record = new getRecord('attributes', target);
-          record.attributeName = name;
-          record.attributeNamespace = namespace;
-
-          // 2.
-          var oldValue =
-              e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
-
-          forEachAncestorAndObserverEnqueueRecord(target, function(options) {
-            // 3.1, 4.2
-            if (!options.attributes)
-              return;
-
-            // 3.2, 4.3
-            if (options.attributeFilter && options.attributeFilter.length &&
-                options.attributeFilter.indexOf(name) === -1 &&
-                options.attributeFilter.indexOf(namespace) === -1) {
-              return;
-            }
-            // 3.3, 4.4
-            if (options.attributeOldValue)
-              return getRecordWithOldValue(oldValue);
-
-            // 3.4, 4.5
-            return record;
-          });
-
-          break;
-
-        case 'DOMCharacterDataModified':
-          // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata
-          var target = e.target;
-
-          // 1.
-          var record = getRecord('characterData', target);
-
-          // 2.
-          var oldValue = e.prevValue;
-
-
-          forEachAncestorAndObserverEnqueueRecord(target, function(options) {
-            // 3.1, 4.2
-            if (!options.characterData)
-              return;
-
-            // 3.2, 4.3
-            if (options.characterDataOldValue)
-              return getRecordWithOldValue(oldValue);
-
-            // 3.3, 4.4
-            return record;
-          });
-
-          break;
-
-        case 'DOMNodeRemoved':
-          this.addTransientObserver(e.target);
-          // Fall through.
-        case 'DOMNodeInserted':
-          // http://dom.spec.whatwg.org/#concept-mo-queue-childlist
-          var target = e.relatedNode;
-          var changedNode = e.target;
-          var addedNodes, removedNodes;
-          if (e.type === 'DOMNodeInserted') {
-            addedNodes = [changedNode];
-            removedNodes = [];
-          } else {
-
-            addedNodes = [];
-            removedNodes = [changedNode];
-          }
-          var previousSibling = changedNode.previousSibling;
-          var nextSibling = changedNode.nextSibling;
-
-          // 1.
-          var record = getRecord('childList', target);
-          record.addedNodes = addedNodes;
-          record.removedNodes = removedNodes;
-          record.previousSibling = previousSibling;
-          record.nextSibling = nextSibling;
-
-          forEachAncestorAndObserverEnqueueRecord(target, function(options) {
-            // 2.1, 3.2
-            if (!options.childList)
-              return;
-
-            // 2.2, 3.3
-            return record;
-          });
-
-      }
-
-      clearRecords();
-    }
-  };
-
-  global.JsMutationObserver = JsMutationObserver;
-
-  // Provide unprefixed MutationObserver with native or JS implementation
-  if (!global.MutationObserver && global.WebKitMutationObserver)
-    global.MutationObserver = global.WebKitMutationObserver;
-
-  if (!global.MutationObserver)
-    global.MutationObserver = JsMutationObserver;
-
-
-})(this);
-
 window.CustomElements = window.CustomElements || {flags:{}};
 (function(scope){

 

 var logFlags = window.logFlags || {};

+var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';

 

 // walk the subtree rooted at node, applying 'find(element, data)' function

 // to each element

@@ -696,11 +152,11 @@
 }

 

 

-// TODO(sorvell): on platforms without MutationObserver, mutations may not be

-// reliable and therefore entered/leftView are not reliable.

+// TODO(sorvell): on platforms without MutationObserver, mutations may not be 

+// reliable and therefore attached/detached are not reliable.

 // To make these callbacks less likely to fail, we defer all inserts and removes

-// to give a chance for elements to be inserted into dom.

-// This ensures enteredViewCallback fires for elements that are created and

+// to give a chance for elements to be inserted into dom. 

+// This ensures attachedCallback fires for elements that are created and 

 // immediately added to dom.

 var hasPolyfillMutations = (!window.MutationObserver ||

     (window.MutationObserver === window.JsMutationObserver));

@@ -749,7 +205,7 @@
   // TODO(sjmiles): when logging, do work on all custom elements so we can

   // track behavior even when callbacks not defined

   //console.log('inserted: ', element.localName);

-  if (element.enteredViewCallback || (element.__upgraded__ && logFlags.dom)) {

+  if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {

     logFlags.dom && console.group('inserted:', element.localName);

     if (inDocument(element)) {

       element.__inserted = (element.__inserted || 0) + 1;

@@ -761,9 +217,9 @@
       if (element.__inserted > 1) {

         logFlags.dom && console.warn('inserted:', element.localName,

           'insert/remove count:', element.__inserted)

-      } else if (element.enteredViewCallback) {

+      } else if (element.attachedCallback) {

         logFlags.dom && console.log('inserted:', element.localName);

-        element.enteredViewCallback();

+        element.attachedCallback();

       }

     }

     logFlags.dom && console.groupEnd();

@@ -790,8 +246,8 @@
 function _removed(element) {

   // TODO(sjmiles): temporary: do work on all custom elements so we can track

   // behavior even when callbacks not defined

-  if (element.leftViewCallback || (element.__upgraded__ && logFlags.dom)) {

-    logFlags.dom && console.log('removed:', element.localName);

+  if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {

+    logFlags.dom && console.group('removed:', element.localName);

     if (!inDocument(element)) {

       element.__inserted = (element.__inserted || 0) - 1;

       // if we are in a 'inserted' state, bluntly adjust to an 'removed' state

@@ -802,17 +258,24 @@
       if (element.__inserted < 0) {

         logFlags.dom && console.warn('removed:', element.localName,

             'insert/remove count:', element.__inserted)

-      } else if (element.leftViewCallback) {

-        element.leftViewCallback();

+      } else if (element.detachedCallback) {

+        element.detachedCallback();

       }

     }

+    logFlags.dom && console.groupEnd();

   }

 }

 

+// SD polyfill intrustion due mainly to the fact that 'document'

+// is not entirely wrapped

+function wrapIfNeeded(node) {

+  return window.ShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node)

+      : node;

+}

+

 function inDocument(element) {

   var p = element;

-  var doc = window.ShadowDOMPolyfill &&

-      window.ShadowDOMPolyfill.wrapIfNeeded(document) || document;

+  var doc = wrapIfNeeded(document);

   while (p) {

     if (p == doc) {

       return true;

@@ -896,19 +359,33 @@
   observer.observe(inRoot, {childList: true, subtree: true});

 }

 

-function observeDocument(document) {

-  observe(document);

+function observeDocument(doc) {

+  observe(doc);

 }

 

-function upgradeDocument(document) {

-  logFlags.dom && console.group('upgradeDocument: ', (document.URL || document._URL || '').split('/').pop());

-  addedNode(document);

+function upgradeDocument(doc) {

+  logFlags.dom && console.group('upgradeDocument: ', (doc.baseURI).split('/').pop());

+  addedNode(doc);

   logFlags.dom && console.groupEnd();

 }

 

-// exports

+function upgradeDocumentTree(doc) {

+  doc = wrapIfNeeded(doc);

+  upgradeDocument(doc);

+  //console.log('upgradeDocumentTree: ', (doc.baseURI).split('/').pop());

+  // upgrade contained imported documents

+  var imports = doc.querySelectorAll('link[rel=' + IMPORT_LINK_TYPE + ']');

+  for (var i=0, l=imports.length, n; (i<l) && (n=imports[i]); i++) {

+    if (n.import && n.import.__parsed) {

+      upgradeDocumentTree(n.import);

+    }

+  }

+}

 

+// exports

+scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;

 scope.watchShadow = watchShadow;

+scope.upgradeDocumentTree = upgradeDocumentTree;

 scope.upgradeAll = addedNode;

 scope.upgradeSubtree = addedSubtree;

 

@@ -938,10 +415,15 @@
 }
 var flags = scope.flags;
 
-// native document.register?
+// native document.registerElement?
 
-var hasNative = Boolean(document.register);
-var useNative = !flags.register && hasNative;
+var hasNative = Boolean(document.registerElement);
+// TODO(sorvell): See https://github.com/Polymer/polymer/issues/399
+// we'll address this by defaulting to CE polyfill in the presence of the SD
+// polyfill. This will avoid spamming excess attached/detached callbacks.
+// If there is a compelling need to run CE native with SD polyfill, 
+// we'll need to fix this issue.
+var useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill;
 
 if (useNative) {
 
@@ -988,7 +470,7 @@
    *      element.
    *
    * @example
-   *      FancyButton = document.register("fancy-button", {
+   *      FancyButton = document.registerElement("fancy-button", {
    *        extends: 'button',
    *        prototype: Object.create(HTMLButtonElement.prototype, {
    *          readyCallback: {
@@ -1001,19 +483,19 @@
    * @return {Function} Constructor for the newly registered type.
    */
   function register(name, options) {
-    //console.warn('document.register("' + name + '", ', options, ')');
+    //console.warn('document.registerElement("' + name + '", ', options, ')');
     // construct a defintion out of options
     // TODO(sjmiles): probably should clone options instead of mutating it
     var definition = options || {};
     if (!name) {
       // TODO(sjmiles): replace with more appropriate error (EricB can probably
       // offer guidance)
-      throw new Error('document.register: first argument `name` must not be empty');
+      throw new Error('document.registerElement: first argument `name` must not be empty');
     }
     if (name.indexOf('-') < 0) {
       // TODO(sjmiles): replace with more appropriate error (EricB can probably
       // offer guidance)
-      throw new Error('document.register: first argument (\'name\') must contain a dash (\'-\'). Argument provided was \'' + String(name) + '\'.');
+      throw new Error('document.registerElement: first argument (\'name\') must contain a dash (\'-\'). Argument provided was \'' + String(name) + '\'.');
     }
     // elements may only be registered once
     if (getRegisteredDefinition(name)) {
@@ -1027,7 +509,7 @@
       throw new Error('Options missing required prototype property');
     }
     // record name
-    definition.name = name.toLowerCase();
+    definition.__name = name.toLowerCase();
     // ensure a lifecycle object so we don't have to null test it
     definition.lifecycle = definition.lifecycle || {};
     // build a list of ancestral custom elements (for native base detection)
@@ -1043,7 +525,7 @@
     // overrides to implement attributeChanged callback
     overrideAttributeApi(definition.prototype);
     // 7.1.5: Register the DEFINITION with DOCUMENT
-    registerDefinition(definition.name, definition);
+    registerDefinition(definition.__name, definition);
     // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE
     // 7.1.8. Return the output of the previous step.
     definition.ctor = generateConstructor(definition);
@@ -1053,7 +535,7 @@
     // if initial parsing is complete
     if (scope.ready || scope.performedInitialDocumentUpgrade) {
       // upgrade any pre-existing nodes of this type
-      scope.upgradeAll(document);
+      scope.upgradeDocumentTree(document);
     }
     return definition.ctor;
   }
@@ -1076,10 +558,10 @@
       baseTag = a.is && a.tag;
     }
     // our tag is our baseTag, if it exists, and otherwise just our name
-    definition.tag = baseTag || definition.name;
+    definition.tag = baseTag || definition.__name;
     if (baseTag) {
       // if there is a base tag, use secondary 'is' specifier
-      definition.is = definition.name;
+      definition.is = definition.__name;
     }
   }
 
@@ -1305,7 +787,7 @@
 
   // exports
 
-  document.register = register;
+  document.registerElement = register;
   document.createElement = createElement; // override
   Node.prototype.cloneNode = cloneNode; // override
 
@@ -1325,16 +807,19 @@
   scope.upgrade = upgradeElement;
 }
 
+// bc
+document.register = document.registerElement;
+
 scope.hasNative = hasNative;
 scope.useNative = useNative;
 
 })(window.CustomElements);
 
-(function() {
+(function(scope) {
 
 // import
 
-var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';
+var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
 
 // highlander object for parsing a document tree
 
@@ -1369,8 +854,8 @@
     }
   },
   parseImport: function(linkElt) {
-    if (linkElt.content) {
-      parser.parse(linkElt.content);
+    if (linkElt.import) {
+      parser.parse(linkElt.import);
     }
   }
 };
@@ -1384,9 +869,10 @@
 
 // exports
 
-CustomElements.parser = parser;
+scope.parser = parser;
+scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
 
-})();
+})(window.CustomElements);
 (function(scope){
 
 // bootstrap parsing
@@ -1401,7 +887,7 @@
     Platform.endOfMicrotask :
     setTimeout;
   async(function() {
-    // set internal 'ready' flag, now document.register will trigger
+    // set internal 'ready' flag, now document.registerElement will trigger 
     // synchronous upgrades
     CustomElements.ready = true;
     // capture blunt profiling data
@@ -1410,7 +896,7 @@
       CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
     }
     // notify the system that we are bootstrapped
-    document.body.dispatchEvent(
+    document.dispatchEvent(
       new CustomEvent('WebComponentsReady', {bubbles: true})
     );
   });
@@ -1438,8 +924,9 @@
 // When loading at other readyStates, wait for the appropriate DOM event to
 // bootstrap.
 } else {
-  var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' :
-      document.readyState == 'loading' ? 'DOMContentLoaded' : 'load';
+  var loadEvent = window.HTMLImports && !HTMLImports.ready
+      ? 'HTMLImportsLoaded'
+      : document.readyState == 'loading' ? 'DOMContentLoaded' : 'load';
   window.addEventListener(loadEvent, bootstrap);
 }
 
diff --git a/pkg/custom_element/lib/custom-elements.min.js b/pkg/custom_element/lib/custom-elements.min.js
index 713ae84..e1e6c59 100644
--- a/pkg/custom_element/lib/custom-elements.min.js
+++ b/pkg/custom_element/lib/custom-elements.min.js
@@ -25,4 +25,4 @@
 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMap=c}(),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.forEach(function(a){var c=a.takeRecords();e(a),c.length&&(a.callback_(c,a),b=!0)}),b&&d()}function e(a){a.nodes_.forEach(function(b){var c=p.get(b);c&&c.forEach(function(b){b.observer===a&&b.removeTransientObservers()})})}function f(a,b){for(var c=a;c;c=c.parentNode){var d=p.get(c);if(d)for(var e=0;e<d.length;e++){var f=d[e],g=f.options;if(c===a||g.subtree){var h=b(g);h&&f.enqueue(h)}}}}function g(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++v}function h(a,b){this.type=a,this.target=b,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function i(a){var b=new h(a.type,a.target);return b.addedNodes=a.addedNodes.slice(),b.removedNodes=a.removedNodes.slice(),b.previousSibling=a.previousSibling,b.nextSibling=a.nextSibling,b.attributeName=a.attributeName,b.attributeNamespace=a.attributeNamespace,b.oldValue=a.oldValue,b}function j(a,b){return w=new h(a,b)}function k(a){return x?x:(x=i(w),x.oldValue=a,x)}function l(){w=x=void 0}function m(a){return a===x||a===w}function n(a,b){return a===b?a:x&&m(a)?x:null}function o(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var p=new WeakMap,q=window.msSetImmediate;if(!q){var r=[],s=String(Math.random());window.addEventListener("message",function(a){if(a.data===s){var b=r;r=[],b.forEach(function(a){a()})}}),q=function(a){r.push(a),window.postMessage(s,"*")}}var t=!1,u=[],v=0;g.prototype={observe:function(a,b){if(a=c(a),!b.childList&&!b.attributes&&!b.characterData||b.attributeOldValue&&!b.attributes||b.attributeFilter&&b.attributeFilter.length&&!b.attributes||b.characterDataOldValue&&!b.characterData)throw new SyntaxError;var d=p.get(a);d||p.set(a,d=[]);for(var e,f=0;f<d.length;f++)if(d[f].observer===this){e=d[f],e.removeListeners(),e.options=b;break}e||(e=new o(this,a,b),d.push(e),this.nodes_.push(a)),e.addListeners()},disconnect:function(){this.nodes_.forEach(function(a){for(var b=p.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){d.removeListeners(),b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}};var w,x;o.prototype={enqueue:function(a){var c=this.observer.records_,d=c.length;if(c.length>0){var e=c[d-1],f=n(e,a);if(f)return c[d-1]=f,void 0}else b(this.observer);c[d]=a},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.options;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData&&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.removeEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListeners_(a),this.transientObservedNodes.push(a);var b=p.get(a);b||p.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a);for(var b=p.get(a),c=0;c<b.length;c++)if(b[c]===this){b.splice(c,1);break}},this)},handleEvent:function(a){switch(a.stopImmediatePropagation(),a.type){case"DOMAttrModified":var b=a.attrName,c=a.relatedNode.namespaceURI,d=a.target,e=new j("attributes",d);e.attributeName=b,e.attributeNamespace=c;var g=a.attrChange===MutationEvent.ADDITION?null:a.prevValue;f(d,function(a){return!a.attributes||a.attributeFilter&&a.attributeFilter.length&&-1===a.attributeFilter.indexOf(b)&&-1===a.attributeFilter.indexOf(c)?void 0:a.attributeOldValue?k(g):e});break;case"DOMCharacterDataModified":var d=a.target,e=j("characterData",d),g=a.prevValue;f(d,function(a){return a.characterData?a.characterDataOldValue?k(g):e:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(a.target);case"DOMNodeInserted":var h,i,d=a.relatedNode,m=a.target;"DOMNodeInserted"===a.type?(h=[m],i=[]):(h=[],i=[m]);var n=m.previousSibling,o=m.nextSibling,e=j("childList",d);e.addedNodes=h,e.removedNodes=i,e.previousSibling=n,e.nextSibling=o,f(d,function(a){return a.childList?e:void 0})}l()}},a.JsMutationObserver=g,!a.MutationObserver&&a.WebKitMutationObserver&&(a.MutationObserver=a.WebKitMutationObserver),a.MutationObserver||(a.MutationObserver=g)}(this),window.CustomElements=window.CustomElements||{flags:{}},function(a){function b(a,c,d){var e=a.firstElementChild;if(!e)for(e=a.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)c(e,d)!==!0&&b(e,c,d),e=e.nextElementSibling;return null}function c(a,b){for(var c=a.shadowRoot;c;)d(c,b),c=c.olderShadowRoot}function d(a,d){b(a,function(a){return d(a)?!0:(c(a,d),void 0)}),c(a,d)}function e(a){return h(a)?(i(a),!0):(l(a),void 0)}function f(a){d(a,function(a){return e(a)?!0:void 0})}function g(a){return e(a)||f(a)}function h(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttribute("is")||b.localName,d=a.registry[c];if(d)return y.dom&&console.group("upgrade:",b.localName),a.upgrade(b),y.dom&&console.groupEnd(),!0}}function i(a){l(a),q(a)&&d(a,function(a){l(a)})}function j(a){if(B.push(a),!A){A=!0;var b=window.Platform&&window.Platform.endOfMicrotask||setTimeout;b(k)}}function k(){A=!1;for(var a,b=B,c=0,d=b.length;d>c&&(a=b[c]);c++)a();B=[]}function l(a){z?j(function(){m(a)}):m(a)}function m(a){(a.enteredViewCallback||a.__upgraded__&&y.dom)&&(y.dom&&console.group("inserted:",a.localName),q(a)&&(a.__inserted=(a.__inserted||0)+1,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?y.dom&&console.warn("inserted:",a.localName,"insert/remove count:",a.__inserted):a.enteredViewCallback&&(y.dom&&console.log("inserted:",a.localName),a.enteredViewCallback())),y.dom&&console.groupEnd())}function n(a){o(a),d(a,function(a){o(a)})}function o(a){z?j(function(){p(a)}):p(a)}function p(a){(a.leftViewCallback||a.__upgraded__&&y.dom)&&(y.dom&&console.log("removed:",a.localName),q(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?y.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.leftViewCallback&&a.leftViewCallback()))}function q(a){for(var b=a,c=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(document)||document;b;){if(b==c)return!0;b=b.parentNode||b.host}}function r(a){if(a.shadowRoot&&!a.shadowRoot.__watched){y.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)s(b),b=b.olderShadowRoot}}function s(a){a.__watched||(v(a),a.__watched=!0)}function t(a){if(y.dom){var b=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(var c=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;var d=c&&(c.URL||c._URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",a.length,d||"")}a.forEach(function(a){"childList"===a.type&&(D(a.addedNodes,function(a){a.localName&&g(a)}),D(a.removedNodes,function(a){a.localName&&n(a)}))}),y.dom&&console.groupEnd()}function u(){t(C.takeRecords()),k()}function v(a){C.observe(a,{childList:!0,subtree:!0})}function w(a){v(a)}function x(a){y.dom&&console.group("upgradeDocument: ",(a.URL||a._URL||"").split("/").pop()),g(a),y.dom&&console.groupEnd()}var y=window.logFlags||{},z=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.hasPolyfillMutations=z;var A=!1,B=[],C=new MutationObserver(t),D=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.watchShadow=r,a.upgradeAll=g,a.upgradeSubtree=f,a.observeDocument=w,a.upgradeDocument=x,a.takeRecords=u}(window.CustomElements),function(a){function b(b,f){var g=f||{};if(!b)throw new Error("document.register: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.register: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b)+"'.");if(m(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b)+"' is already registered");if(!g.prototype)throw new Error("Options missing required prototype property");return g.name=b.toLowerCase(),g.lifecycle=g.lifecycle||{},g.ancestry=c(g.extends),d(g),e(g),k(g.prototype),n(g.name,g),g.ctor=o(g),g.ctor.prototype=g.prototype,g.prototype.constructor=g.ctor,(a.ready||a.performedInitialDocumentUpgrade)&&a.upgradeAll(document),g.ctor}function c(a){var b=m(a);return b?c(b.extends).concat([b]):[]}function d(a){for(var b,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c||a.name,c&&(a.is=a.name)}function e(a){if(!Object.__proto__){var b=HTMLElement.prototype;if(a.is){var c=document.createElement(a.tag);b=Object.getPrototypeOf(c)}for(var d,e=a.prototype;e&&e!==b;){var d=Object.getPrototypeOf(e);e.__proto__=d,e=d}}a.native=b}function f(a){return g(x(a.tag),a)}function g(b,c){return c.is&&b.setAttribute("is",c.is),b.removeAttribute("unresolved"),h(b,c),b.__upgraded__=!0,a.upgradeSubtree(b),j(b),b}function h(a,b){Object.__proto__?a.__proto__=b.prototype:(i(a,b.prototype,b.native),a.constructor=b.prototype.constructor,a.__proto__=b.prototype)}function i(a,b,c){for(var d={},e=b;e!==c&&e!==HTMLUnknownElement.prototype;){for(var f,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function j(a){a.createdCallback&&a.createdCallback()}function k(a){if(!a.setAttribute._polyfilled){var b=a.setAttribute;a.setAttribute=function(a,c){l.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a){l.call(this,a,null,c)},a.setAttribute._polyfilled=!0}}function l(a,b,c){var d=this.getAttribute(a);c.apply(this,arguments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.attributeChangedCallback(a,d,e)}function m(a){return a?w[a.toLowerCase()]:void 0}function n(a,b){if(w[a])throw new Error("a type with that name is already registered.");w[a]=b}function o(a){return function(){return f(a)}}function p(a,b){var c=m(b||a);if(c){if(a==c.tag&&b==c.is)return new c.ctor;if(!b&&!c.is)return new c.ctor}if(b){var d=p(a);return d.setAttribute("is",b),d}var d=x(a);return a.indexOf("-")>=0&&h(d,HTMLElement),d}function q(a){if(!a.__upgraded__&&a.nodeType===Node.ELEMENT_NODE){var b=a.getAttribute("is"),c=w[b||a.localName];if(c){if(b&&c.tag==a.localName)return g(a,c);if(!b&&!c.extends)return g(a,c)}}}function r(b){var c=y.call(this,b);return a.upgradeAll(c),c}a||(a=window.CustomElements={flags:{}});var s=a.flags,t=Boolean(document.register),u=!s.register&&t;if(u){var v=function(){};a.registry={},a.upgradeElement=v,a.watchShadow=v,a.upgrade=v,a.upgradeAll=v,a.upgradeSubtree=v,a.observeDocument=v,a.upgradeDocument=v,a.takeRecords=v}else{var w={},x=document.createElement.bind(document),y=Node.prototype.cloneNode;document.register=b,document.createElement=p,Node.prototype.cloneNode=r,a.registry=w,a.upgrade=q}a.hasNative=t,a.useNative=u}(window.CustomElements),function(){function a(a){return"link"===a.localName&&a.getAttribute("rel")===b}var b=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",c={selectors:["link[rel="+b+"]"],map:{link:"parseLink"},parse:function(a){if(!a.__parsed){a.__parsed=!0;var b=a.querySelectorAll(c.selectors);d(b,function(a){c[c.map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observeDocument(a)}},parseLink:function(b){a(b)&&this.parseImport(b)},parseImport:function(a){a.content&&c.parse(a.content)}},d=Array.prototype.forEach.call.bind(Array.prototype.forEach);CustomElements.parser=c}(),function(a){function b(){CustomElements.parser.parse(document),CustomElements.upgradeDocument(document),CustomElements.performedInitialDocumentUpgrade=!0;var a=window.Platform&&Platform.endOfMicrotask?Platform.endOfMicrotask:setTimeout;a(function(){CustomElements.ready=!0,CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.body.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState||a.flags.eager)b();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var c=window.HTMLImports?"HTMLImportsLoaded":"loading"==document.readyState?"DOMContentLoaded":"load";window.addEventListener(c,b)}else b()}(window.CustomElements),function(){if(HTMLElement.prototype.createShadowRoot){var a=HTMLElement.prototype.createShadowRoot;HTMLElement.prototype.createShadowRoot=function(){var b=a.call(this);return b.host=this,CustomElements.watchShadow(this),b}}if(window.ShadowDOMPolyfill){var b=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],c={};b.forEach(function(a){c[a]=CustomElements[a]}),b.forEach(function(a){CustomElements[a]=function(b){return c[a](window.ShadowDOMPolyfill.wrapIfNeeded(b))}})}if(window.CustomElements&&!CustomElements.useNative){var d=Document.prototype.importNode;Document.prototype.importNode=function(a,b){var c=d.call(this,a,b);return CustomElements.upgradeAll(c),c}}}();
\ No newline at end of file
+"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMap=c}(),window.CustomElements=window.CustomElements||{flags:{}},function(a){function b(a,c,d){var e=a.firstElementChild;if(!e)for(e=a.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)c(e,d)!==!0&&b(e,c,d),e=e.nextElementSibling;return null}function c(a,b){for(var c=a.shadowRoot;c;)d(c,b),c=c.olderShadowRoot}function d(a,d){b(a,function(a){return d(a)?!0:void c(a,d)}),c(a,d)}function e(a){return h(a)?(i(a),!0):void l(a)}function f(a){d(a,function(a){return e(a)?!0:void 0})}function g(a){return e(a)||f(a)}function h(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttribute("is")||b.localName,d=a.registry[c];if(d)return A.dom&&console.group("upgrade:",b.localName),a.upgrade(b),A.dom&&console.groupEnd(),!0}}function i(a){l(a),r(a)&&d(a,function(a){l(a)})}function j(a){if(E.push(a),!D){D=!0;var b=window.Platform&&window.Platform.endOfMicrotask||setTimeout;b(k)}}function k(){D=!1;for(var a,b=E,c=0,d=b.length;d>c&&(a=b[c]);c++)a();E=[]}function l(a){C?j(function(){m(a)}):m(a)}function m(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("inserted:",a.localName),r(a)&&(a.__inserted=(a.__inserted||0)+1,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?A.dom&&console.warn("inserted:",a.localName,"insert/remove count:",a.__inserted):a.attachedCallback&&(A.dom&&console.log("inserted:",a.localName),a.attachedCallback())),A.dom&&console.groupEnd())}function n(a){o(a),d(a,function(a){o(a)})}function o(a){C?j(function(){p(a)}):p(a)}function p(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("removed:",a.localName),r(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?A.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.detachedCallback&&a.detachedCallback()),A.dom&&console.groupEnd())}function q(a){return window.ShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(a):a}function r(a){for(var b=a,c=q(document);b;){if(b==c)return!0;b=b.parentNode||b.host}}function s(a){if(a.shadowRoot&&!a.shadowRoot.__watched){A.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)t(b),b=b.olderShadowRoot}}function t(a){a.__watched||(w(a),a.__watched=!0)}function u(a){if(A.dom){var b=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(var c=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;var d=c&&(c.URL||c._URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",a.length,d||"")}a.forEach(function(a){"childList"===a.type&&(G(a.addedNodes,function(a){a.localName&&g(a)}),G(a.removedNodes,function(a){a.localName&&n(a)}))}),A.dom&&console.groupEnd()}function v(){u(F.takeRecords()),k()}function w(a){F.observe(a,{childList:!0,subtree:!0})}function x(a){w(a)}function y(a){A.dom&&console.group("upgradeDocument: ",a.baseURI.split("/").pop()),g(a),A.dom&&console.groupEnd()}function z(a){a=q(a),y(a);for(var b,c=a.querySelectorAll("link[rel="+B+"]"),d=0,e=c.length;e>d&&(b=c[d]);d++)b.import&&b.import.__parsed&&z(b.import)}var A=window.logFlags||{},B=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",C=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.hasPolyfillMutations=C;var D=!1,E=[],F=new MutationObserver(u),G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.IMPORT_LINK_TYPE=B,a.watchShadow=s,a.upgradeDocumentTree=z,a.upgradeAll=g,a.upgradeSubtree=f,a.observeDocument=x,a.upgradeDocument=y,a.takeRecords=v}(window.CustomElements),function(a){function b(b,f){var g=f||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b)+"'.");if(m(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b)+"' is already registered");if(!g.prototype)throw new Error("Options missing required prototype property");return g.__name=b.toLowerCase(),g.lifecycle=g.lifecycle||{},g.ancestry=c(g.extends),d(g),e(g),k(g.prototype),n(g.__name,g),g.ctor=o(g),g.ctor.prototype=g.prototype,g.prototype.constructor=g.ctor,(a.ready||a.performedInitialDocumentUpgrade)&&a.upgradeDocumentTree(document),g.ctor}function c(a){var b=m(a);return b?c(b.extends).concat([b]):[]}function d(a){for(var b,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c||a.__name,c&&(a.is=a.__name)}function e(a){if(!Object.__proto__){var b=HTMLElement.prototype;if(a.is){var c=document.createElement(a.tag);b=Object.getPrototypeOf(c)}for(var d,e=a.prototype;e&&e!==b;){var d=Object.getPrototypeOf(e);e.__proto__=d,e=d}}a.native=b}function f(a){return g(x(a.tag),a)}function g(b,c){return c.is&&b.setAttribute("is",c.is),b.removeAttribute("unresolved"),h(b,c),b.__upgraded__=!0,a.upgradeSubtree(b),j(b),b}function h(a,b){Object.__proto__?a.__proto__=b.prototype:(i(a,b.prototype,b.native),a.constructor=b.prototype.constructor,a.__proto__=b.prototype)}function i(a,b,c){for(var d={},e=b;e!==c&&e!==HTMLUnknownElement.prototype;){for(var f,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function j(a){a.createdCallback&&a.createdCallback()}function k(a){if(!a.setAttribute._polyfilled){var b=a.setAttribute;a.setAttribute=function(a,c){l.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a){l.call(this,a,null,c)},a.setAttribute._polyfilled=!0}}function l(a,b,c){var d=this.getAttribute(a);c.apply(this,arguments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.attributeChangedCallback(a,d,e)}function m(a){return a?w[a.toLowerCase()]:void 0}function n(a,b){if(w[a])throw new Error("a type with that name is already registered.");w[a]=b}function o(a){return function(){return f(a)}}function p(a,b){var c=m(b||a);if(c){if(a==c.tag&&b==c.is)return new c.ctor;if(!b&&!c.is)return new c.ctor}if(b){var d=p(a);return d.setAttribute("is",b),d}var d=x(a);return a.indexOf("-")>=0&&h(d,HTMLElement),d}function q(a){if(!a.__upgraded__&&a.nodeType===Node.ELEMENT_NODE){var b=a.getAttribute("is"),c=w[b||a.localName];if(c){if(b&&c.tag==a.localName)return g(a,c);if(!b&&!c.extends)return g(a,c)}}}function r(b){var c=y.call(this,b);return a.upgradeAll(c),c}a||(a=window.CustomElements={flags:{}});var s=a.flags,t=Boolean(document.registerElement),u=!s.register&&t&&!window.ShadowDOMPolyfill;if(u){var v=function(){};a.registry={},a.upgradeElement=v,a.watchShadow=v,a.upgrade=v,a.upgradeAll=v,a.upgradeSubtree=v,a.observeDocument=v,a.upgradeDocument=v,a.takeRecords=v}else{var w={},x=document.createElement.bind(document),y=Node.prototype.cloneNode;document.registerElement=b,document.createElement=p,Node.prototype.cloneNode=r,a.registry=w,a.upgrade=q}document.register=document.registerElement,a.hasNative=t,a.useNative=u}(window.CustomElements),function(a){function b(a){return"link"===a.localName&&a.getAttribute("rel")===c}var c=a.IMPORT_LINK_TYPE,d={selectors:["link[rel="+c+"]"],map:{link:"parseLink"},parse:function(a){if(!a.__parsed){a.__parsed=!0;var b=a.querySelectorAll(d.selectors);e(b,function(a){d[d.map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observeDocument(a)}},parseLink:function(a){b(a)&&this.parseImport(a)},parseImport:function(a){a.import&&d.parse(a.import)}},e=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=d,a.IMPORT_LINK_TYPE=c}(window.CustomElements),function(a){function b(){CustomElements.parser.parse(document),CustomElements.upgradeDocument(document),CustomElements.performedInitialDocumentUpgrade=!0;var a=window.Platform&&Platform.endOfMicrotask?Platform.endOfMicrotask:setTimeout;a(function(){CustomElements.ready=!0,CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState||a.flags.eager)b();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var c=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"loading"==document.readyState?"DOMContentLoaded":"load";window.addEventListener(c,b)}else b()}(window.CustomElements),function(){if(HTMLElement.prototype.createShadowRoot){var a=HTMLElement.prototype.createShadowRoot;HTMLElement.prototype.createShadowRoot=function(){var b=a.call(this);return b.host=this,CustomElements.watchShadow(this),b}}if(window.ShadowDOMPolyfill){var b=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],c={};b.forEach(function(a){c[a]=CustomElements[a]}),b.forEach(function(a){CustomElements[a]=function(b){return c[a](window.ShadowDOMPolyfill.wrapIfNeeded(b))}})}if(window.CustomElements&&!CustomElements.useNative){var d=Document.prototype.importNode;Document.prototype.importNode=function(a,b){var c=d.call(this,a,b);return CustomElements.upgradeAll(c),c}}}();
\ No newline at end of file
diff --git a/pkg/custom_element/lib/polyfill.dart b/pkg/custom_element/lib/polyfill.dart
index 413d7d6..939fb36 100644
--- a/pkg/custom_element/lib/polyfill.dart
+++ b/pkg/custom_element/lib/polyfill.dart
@@ -54,6 +54,12 @@
  */
 Future loadCustomElementPolyfill() {
   if (!document.supportsRegister && !js.context.hasProperty('CustomElements')) {
+    if (!MutationObserver.supported) {
+      var script = new ScriptElement()
+          ..src = '/packages/mutation_observer/mutation_observer.js';
+      document.head.append(script);
+    }
+
     var script = new ScriptElement()
         ..src = '/packages/custom_element/custom-elements.debug.js';
     document.head.append(script);
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index fb4238f..168b637 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -86,16 +86,14 @@
   * [Tutorials](http://www.dartlang.org/docs/tutorials/)
   * [Programmer's Guide](http://www.dartlang.org/docs/)
   * [Samples](http://www.dartlang.org/samples/)
-  * [A Tour of the Dart Libraries](http://www.dartlang.org/docs/dart-up-and-runn
-ing/contents/ch03.html)
+  * [A Tour of the Dart Libraries](http://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html)
 
 This API reference is automatically generated from the source code in the
 [Dart project](https://code.google.com/p/dart/).
 If you'd like to contribute to this documentation, see
 [Contributing](https://code.google.com/p/dart/wiki/Contributing)
 and
-[Writing API Documentation](https://code.google.com/p/dart/wiki/WritingApiDocume
-ntation).
+[Writing API Documentation](https://code.google.com/p/dart/wiki/WritingApiDocumentation).
 """;
 
 // TODO(efortuna): The use of this field is odd (this is based on how it was
@@ -104,125 +102,6 @@
 /// created more than once.
 Map<String, Indexable> entityMap = new Map<String, Indexable>();
 
-/// Index of all the dart2js mirrors examined to corresponding MirrorBased
-/// docgen objects.
-///
-/// Used for lookup because of the dart2js mirrors exports
-/// issue. The second level map is indexed by owner docName for faster lookup.
-/// Why two levels of lookup? Speed, man. Speed.
-Map<String, Map<String, Set<MirrorBased>>> mirrorToDocgen =
-    new Map<String, Map<String, Set<MirrorBased>>>();
-
-/// Given a Dart2jsMirror, find the corresponding Docgen [MirrorBased] object.
-///
-/// We have this global lookup function to avoid re-implementing looking up the
-/// scoping rules for comment resolution here (it is currently done in mirrors).
-/// If no corresponding MirrorBased object is found, we return a [DummyMirror]
-/// that simply returns the original mirror's qualifiedName while behaving like
-/// a MirrorBased object.
-MirrorBased getDocgenObject(DeclarationMirror mirror, [Indexable owner]) {
-  Map<String, Set<MirrorBased>> docgenObj =
-      mirrorToDocgen[mirror.qualifiedName];
-  if (docgenObj == null) {
-    return new DummyMirror(mirror, owner);
-  }
-
-  Set<MirrorBased> results = new Set<MirrorBased>();
-  var setToExamine = new Set();
-  if (owner != null) {
-    var firstSet = docgenObj[owner.docName];
-    if (firstSet != null) setToExamine.addAll(firstSet);
-    if (Indexable._coreLibrary != null &&
-        docgenObj[Indexable._coreLibrary.docName] != null) {
-      setToExamine.addAll(docgenObj[Indexable._coreLibrary.docName]);
-    }
-  } else {
-    for (var value in docgenObj.values) {
-      setToExamine.addAll(value);
-    }
-  }
-
-  for(MirrorBased mirrorBased in setToExamine) {
-    // This check makes me sad, but Dart doesn't seem to be dynamic enough to
-    // write this another way. Dart2js and the editor didn't like the Type
-    // lookup in a map.
-    if (mirrorBased.mirror.qualifiedName == mirror.qualifiedName &&
-        ((mirror is ClassMirror && mirrorBased is Class)
-        || (mirror is LibraryMirror && mirrorBased is Library)
-        || (mirror is MethodMirror && mirrorBased is Method)
-        || (mirror is VariableMirror && mirrorBased is Variable)
-        || (mirror is TypedefMirror && mirrorBased is Typedef)
-        || (mirror is TypeMirror && mirrorBased is Type)
-        || (mirror is InstanceMirror && mirrorBased is Annotation))) {
-      results.add(mirrorBased);
-    }
-  }
-
-  if (results.length > 0) {
-    return results.first; // This might occur if we didn't specify an "owner."
-  }
-  return new DummyMirror(mirror, owner);
-}
-
-/// For types that we do not explicitly create or have not yet created in our
-/// entity map (like core types).
-class DummyMirror implements MirrorBased {
-  DeclarationMirror mirror;
-  /// The library that contains this element, if any. Used as a hint to help
-  /// determine which object we're referring to when looking up this mirror in
-  /// our map.
-  Indexable owner;
-  DummyMirror(this.mirror, [this.owner]);
-
-  String get docName {
-    if (mirror == null) return '';
-    if (mirror is LibraryMirror) {
-      return mirror.qualifiedName.replaceAll('.','-');
-    }
-    var mirrorOwner = mirror.owner;
-    if (mirrorOwner == null) return mirror.qualifiedName;
-    var simpleName = mirror.simpleName;
-    if (mirror is MethodMirror && (mirror as MethodMirror).isConstructor) {
-      // We name constructors specially -- including the class name again and a
-      // "-" to separate the constructor from its name (if any).
-      simpleName = '${mirrorOwner.simpleName}-$simpleName';
-    }
-    return getDocgenObject(mirrorOwner, owner).docName + '.' + simpleName;
-  }
-  List<Annotation> _createAnnotations(DeclarationMirror mirror,
-      Library owningLibrary) => null;
-
-  bool get isPrivate => mirror == null? false : mirror.isPrivate;
-}
-
-abstract class MirrorBased {
-  DeclarationMirror get mirror;
-  MirrorBased owner;
-
-  /// Returns this object's qualified name, but following the conventions
-  /// we're using in Dartdoc, which is that library names with dots in them
-  /// have them replaced with hyphens.
-  String get docName => owner.docName + '.' + mirror.simpleName;
-
-  /// Returns a list of meta annotations assocated with a mirror.
-  List<Annotation> _createAnnotations(DeclarationMirror mirror,
-      Library owningLibrary) {
-    var annotationMirrors = mirror.metadata.where((e) =>
-        e is dart2js.Dart2JsConstructedConstantMirror);
-    var annotations = [];
-    annotationMirrors.forEach((annotation) {
-      var docgenAnnotation = new Annotation(annotation, owningLibrary);
-      if (!_SKIPPED_ANNOTATIONS.contains(
-          docgenAnnotation.mirror.qualifiedName)) {
-        annotations.add(docgenAnnotation);
-      }
-    });
-    return annotations;
-  }
-
-  bool get isPrivate => false;
-}
-
 /// Docgen constructor initializes the link resolver for markdown parsing.
 /// Also initializes the command line arguments.
 ///
@@ -251,8 +130,8 @@
 Future<MirrorSystem> getMirrorSystem(List<Uri> libraries,
     {String packageRoot, bool parseSdk: false}) {
   if (libraries.isEmpty) throw new StateError('No Libraries.');
-  // Finds the root of SDK library based off the location of docgen.
 
+  // Finds the root of SDK library based off the location of docgen.
   var root = _Generator._rootDirectory;
   var sdkRoot = path.normalize(path.absolute(path.join(root, 'sdk')));
   _Generator.logger.info('SDK Root: ${sdkRoot}');
@@ -260,6 +139,75 @@
       packageRoot: packageRoot);
 }
 
+/// For types that we do not explicitly create or have not yet created in our
+/// entity map (like core types).
+class DummyMirror implements Indexable {
+  DeclarationMirror mirror;
+  /// The library that contains this element, if any. Used as a hint to help
+  /// determine which object we're referring to when looking up this mirror in
+  /// our map.
+  Indexable owner;
+  DummyMirror(this.mirror, [this.owner]);
+
+  String get docName {
+    if (mirror == null) return '';
+    if (mirror is LibraryMirror) {
+      return mirror.qualifiedName.replaceAll('.','-');
+    }
+    var mirrorOwner = mirror.owner;
+    if (mirrorOwner == null) return mirror.qualifiedName;
+    var simpleName = mirror.simpleName;
+    if (mirror is MethodMirror && (mirror as MethodMirror).isConstructor) {
+      // We name constructors specially -- repeating the class name and a
+      // "-" to separate the constructor from its name (if any).
+      simpleName = '${mirrorOwner.simpleName}-$simpleName';
+    }
+    return Indexable.getDocgenObject(mirrorOwner, owner).docName + '.' +
+        simpleName;
+  }
+
+  bool get isPrivate => mirror == null? false : mirror.isPrivate;
+
+  String get packageName {
+    var libMirror = _getOwningLibraryFromMirror(mirror);
+    if (libMirror != null) {
+      return Library._packageName(libMirror);
+    }
+    return '';
+  }
+
+  String get packagePrefix => packageName == null || packageName.isEmpty ?
+      '' : '$packageName/';
+
+  LibraryMirror _getOwningLibraryFromMirror(DeclarationMirror mirror) {
+    if (mirror is LibraryMirror) return mirror;
+    if (mirror == null) return null;
+    return _getOwningLibraryFromMirror(mirror.owner);
+  }
+}
+
+/// Docgen representation of an item to be documented, that wraps around a
+/// dart2js mirror.
+abstract class MirrorBased {
+  DeclarationMirror get mirror;
+
+  /// Returns a list of meta annotations assocated with a mirror.
+  List<Annotation> _createAnnotations(DeclarationMirror mirror,
+      Library owningLibrary) {
+    var annotationMirrors = mirror.metadata.where((e) =>
+        e is dart2js.Dart2JsConstructedConstantMirror);
+    var annotations = [];
+    annotationMirrors.forEach((annotation) {
+      var docgenAnnotation = new Annotation(annotation, owningLibrary);
+      if (!_SKIPPED_ANNOTATIONS.contains(
+          docgenAnnotation.mirror.qualifiedName)) {
+        annotations.add(docgenAnnotation);
+      }
+    });
+    return annotations;
+  }
+}
+
 class _Generator {
   static var _outputDirectory;
 
@@ -332,7 +280,7 @@
       });
   }
 
-  /// Writes text to a file in the output directory.
+  /// Writes [text] to a file in the output directory.
   static void _writeToFile(String text, String filename, {bool append: false}) {
     if (text == null) return;
     Directory dir = new Directory(_outputDirectory);
@@ -622,8 +570,9 @@
     return sdk;
   }
 
-  static bool _isFullChainVisible(MirrorBased item) {
-    // TODO: reconcile with isVisible
+  static bool _isFullChainVisible(Indexable item) {
+    // TODO: reconcile with isVisible.
+    // TODO: Also should be able to take MirrorBased items in general probably.
     var result = _includePrivate || (!item.isPrivate && (item.owner != null ?
         _isFullChainVisible(item.owner) : true));
     return result;
@@ -648,7 +597,7 @@
 /// the user to be able to search for a method based on its parameter names!
 /// The set of indexable items also includes Typedefs, since the user can refer
 /// to them as concrete entities in a particular scope.
-class Indexable extends MirrorBased {
+abstract class Indexable extends MirrorBased {
   /// The dart:core library, which contains all types that are always available
   /// without import.
   static Library _coreLibrary;
@@ -670,24 +619,31 @@
   /// Map of all the comments for dom elements from MDN.
   static Map _mdn;
 
+  /// Index of all the dart2js mirrors examined to corresponding MirrorBased
+  /// docgen objects.
+  ///
+  /// Used for lookup because of the dart2js mirrors exports
+  /// issue. The second level map is indexed by owner docName for faster lookup.
+  /// Why two levels of lookup? Speed, man. Speed.
+  static Map<String, Map<String, Set<Indexable>>> _mirrorToDocgen =
+      new Map<String, Map<String, Set<Indexable>>>();
+
   Indexable(this.mirror) {
     this.isPrivate = _isHidden(mirror);
 
-    var map = mirrorToDocgen[this.mirror.qualifiedName];
-    if (map == null) map = new Map<String, Set<MirrorBased>>();
+    var map = _mirrorToDocgen[this.mirror.qualifiedName];
+    if (map == null) map = new Map<String, Set<Indexable>>();
 
     var set = map[owner.docName];
-    if (set == null) set = new Set<MirrorBased>();
+    if (set == null) set = new Set<Indexable>();
     set.add(this);
     map[owner.docName] = set;
-    mirrorToDocgen[this.mirror.qualifiedName] = map;
+    _mirrorToDocgen[this.mirror.qualifiedName] = map;
   }
 
   /** Walk up the owner chain to find the owning library. */
   Library _getOwningLibrary(Indexable indexable) {
     if (indexable is Library) return indexable;
-    // TODO: is this needed?
-    if (indexable is DummyMirror) return getDocgenObject(indexable.mirror.library);
     return _getOwningLibrary(indexable.owner);
   }
 
@@ -698,6 +654,11 @@
         lib.uri.toString().startsWith('dart:core')));
   }
 
+  /// Returns this object's qualified name, but following the conventions
+  /// we're using in Dartdoc, which is that library names with dots in them
+  /// have them replaced with hyphens.
+  String get docName;
+
   markdown.Node fixReferenceWithScope(String name) => null;
 
   /// Converts all [foo] references in comments to <a>libraryName.foo</a>.
@@ -747,7 +708,7 @@
 
   String get name => mirror.simpleName;
 
-  MirrorBased get owner => new DummyMirror(mirror.owner);
+  Indexable get owner => new DummyMirror(mirror.owner);
 
   /// Generates MDN comments from database.json.
   String _mdnComment() {
@@ -1084,6 +1045,52 @@
   }
 
   bool get _isVisible => _Generator._includePrivate || !isPrivate;
+
+  /// Given a Dart2jsMirror, find the corresponding Docgen [MirrorBased] object.
+  ///
+  /// We have this global lookup function to avoid re-implementing looking up
+  /// the scoping rules for comment resolution here (it is currently done in
+  /// mirrors). If no corresponding MirrorBased object is found, we return a
+  /// [DummyMirror] that simply returns the original mirror's qualifiedName
+  /// while behaving like a MirrorBased object.
+  static Indexable getDocgenObject(DeclarationMirror mirror,
+    [Indexable owner]) {
+    Map<String, Set<Indexable>> docgenObj =
+        _mirrorToDocgen[mirror.qualifiedName];
+    if (docgenObj == null) {
+      return new DummyMirror(mirror, owner);
+    }
+
+    var setToExamine = new Set();
+    if (owner != null) {
+      var firstSet = docgenObj[owner.docName];
+      if (firstSet != null) setToExamine.addAll(firstSet);
+      if (_coreLibrary != null &&
+          docgenObj[_coreLibrary.docName] != null) {
+        setToExamine.addAll(docgenObj[_coreLibrary.docName]);
+      }
+    } else {
+      for (var value in docgenObj.values) {
+        setToExamine.addAll(value);
+      }
+    }
+
+    Set<Indexable> results = new Set<Indexable>();
+    for(Indexable indexable in setToExamine) {
+      if (indexable.mirror.qualifiedName == mirror.qualifiedName &&
+          indexable._isValidMirror(mirror)) {
+        results.add(indexable);
+      }
+    }
+
+    if (results.length > 0) {
+      // This might occur if we didn't specify an "owner."
+      return results.first;
+    }
+    return new DummyMirror(mirror, owner);
+  }
+
+  bool _isValidMirror(DeclarationMirror mirror);
 }
 
 /// A class containing contents of a Dart library.
@@ -1106,7 +1113,7 @@
   /// Returns the [Library] for the given [mirror] if it has already been
   /// created, else creates it.
   factory Library(LibraryMirror mirror) {
-    var library = getDocgenObject(mirror);
+    var library = Indexable.getDocgenObject(mirror);
     if (library is DummyMirror) {
       library = new Library._(mirror);
     }
@@ -1126,10 +1133,9 @@
           // but we don't have visibility to that type.
           var mirror = classMirror;
           if (_Generator._includePrivate || !mirror.isPrivate) {
-            entityMap[getDocgenObject(mirror).docName] =
-                new Typedef(mirror, this);
-            typedefs[mirror.simpleName] =
-                entityMap[getDocgenObject(mirror).docName];
+            var aTypedef = new Typedef(mirror, this);
+            entityMap[Indexable.getDocgenObject(mirror).docName] = aTypedef;
+            typedefs[mirror.simpleName] = aTypedef;
           }
         } else {
           var clazz = new Class(classMirror, this);
@@ -1156,7 +1162,7 @@
     var lookupFunc = Indexable.determineLookupFunc(name);
     var libraryScope = lookupFunc(mirror, name);
     if (libraryScope != null) {
-      var result = getDocgenObject(libraryScope, this);
+      var result = Indexable.getDocgenObject(libraryScope, this);
       if (result is DummyMirror) return packagePrefix + result.docName;
       return result.packagePrefix + result.docName;
     }
@@ -1172,15 +1178,12 @@
     if (hasBeenCheckedForPackage) return packageName;
     hasBeenCheckedForPackage = true;
     if (mirror.uri.scheme != 'file') return '';
-    var filePath = mirror.uri.toFilePath();
     // We assume that we are documenting only libraries under package/lib
-    var rootdir = path.dirname((path.dirname(filePath)));
-    var pubspec = path.join(rootdir, 'pubspec.yaml');
-    packageName = _packageName(pubspec);
+    packageName = _packageName(mirror);
     // Associate the package readme with all the libraries. This is a bit
     // wasteful, but easier than trying to figure out which partial match
     // is best.
-    packageIntro = _packageIntro(rootdir);
+    packageIntro = _packageIntro(_getRootdir(mirror));
     return packageName;
   }
 
@@ -1201,8 +1204,16 @@
     return contents;
   }
 
+  /// Given a LibraryMirror that is a library, return the name of the directory
+  /// holding that library.
+  static String _getRootdir(LibraryMirror mirror) =>
+      path.dirname(path.dirname(mirror.uri.toFilePath()));
+
   /// Read a pubspec and return the library name.
-  String _packageName(String pubspecName) {
+  static String _packageName(LibraryMirror mirror) {
+    if (mirror.uri.scheme != 'file') return '';
+    var rootdir = _getRootdir(mirror);
+    var pubspecName = path.join(rootdir, 'pubspec.yaml');
     File pubspec = new File(pubspecName);
     if (!pubspec.existsSync()) return '';
     var contents = pubspec.readAsStringSync();
@@ -1314,10 +1325,23 @@
   };
 
   String get typeName => 'library';
+
+  bool _isValidMirror(DeclarationMirror mirror) => mirror is LibraryMirror;
+}
+
+abstract class OwnedIndexable extends Indexable {
+  Indexable owner;
+
+  /// Returns this object's qualified name, but following the conventions
+  /// we're using in Dartdoc, which is that library names with dots in them
+  /// have them replaced with hyphens.
+  String get docName => owner.docName + '.' + mirror.simpleName;
+
+  OwnedIndexable(DeclarationMirror mirror, this.owner) : super(mirror);
 }
 
 /// A class containing contents of a Dart class.
-class Class extends Indexable implements Comparable {
+class Class extends OwnedIndexable implements Comparable {
 
   /// List of the names of interfaces that this class implements.
   List<Class> interfaces = [];
@@ -1348,12 +1372,10 @@
   /// Make sure that we don't check for inherited comments more than once.
   bool _commentsEnsured = false;
 
-  Indexable owner;
-
   /// Returns the [Class] for the given [mirror] if it has already been created,
   /// else creates it.
   factory Class(ClassMirror mirror, Library owner) {
-    var clazz = getDocgenObject(mirror, owner);
+    var clazz = Indexable.getDocgenObject(mirror, owner);
     if (clazz is DummyMirror) {
       clazz = new Class._(mirror, owner);
       entityMap[clazz.docName] = clazz;
@@ -1368,7 +1390,7 @@
   factory Class._possiblyDifferentOwner(ClassMirror mirror,
       Library originalOwner) {
     if (mirror.owner is LibraryMirror) {
-      var realOwner = getDocgenObject(mirror.owner);
+      var realOwner = Indexable.getDocgenObject(mirror.owner);
       if (realOwner is Library) {
         return new Class(mirror, realOwner);
       } else {
@@ -1379,7 +1401,8 @@
     }
   }
 
-  Class._(ClassMirror classMirror, this.owner) : super(classMirror) {
+  Class._(ClassMirror classMirror, Indexable owner) :
+      super(classMirror, owner) {
     inheritedVariables = {};
 
     // The reason we do this madness is the superclass and interface owners may
@@ -1417,7 +1440,7 @@
     while (classScope != null) {
       var classFunc = lookupFunc(classScope.mirror, name);
       if (classFunc != null) {
-        return packagePrefix + getDocgenObject(classFunc, owner).docName;
+        return packagePrefix + Indexable.getDocgenObject(classFunc, owner).docName;
       }
       classScope = classScope.superclass;
     }
@@ -1462,12 +1485,12 @@
    */
   void addInheritedMethod(Class parent, Class newParent) {
     parent.inheritedMethods.forEach((name, method) {
-      if(!method.isConstructor){
+      if(!method.mirror.isConstructor){
         inheritedMethods[name] = new Method(method.mirror, newParent, method);
       }}
     );
     _allButStatics(parent.methods).forEach((name, method) {
-      if (!method.isConstructor) {
+      if (!method.mirror.isConstructor) {
         inheritedMethods[name] = new Method(method.mirror, newParent, method);
       }}
     );
@@ -1561,9 +1584,11 @@
   };
 
   int compareTo(aClass) => name.compareTo(aClass.name);
+
+  bool _isValidMirror(DeclarationMirror mirror) => mirror is ClassMirror;
 }
 
-class Typedef extends Indexable {
+class Typedef extends OwnedIndexable {
   String returnType;
 
   Map<String, Parameter> parameters;
@@ -1577,16 +1602,16 @@
   /// Returns the [Library] for the given [mirror] if it has already been
   /// created, else creates it.
   factory Typedef(TypedefMirror mirror, Library owningLibrary) {
-    var aTypedef = getDocgenObject(mirror, owningLibrary);
+    var aTypedef = Indexable.getDocgenObject(mirror, owningLibrary);
     if (aTypedef is DummyMirror) {
       aTypedef = new Typedef._(mirror, owningLibrary);
     }
     return aTypedef;
   }
 
-  Typedef._(TypedefMirror mirror, Library owningLibrary) : super(mirror) {
-    owner = owningLibrary;
-    returnType = getDocgenObject(mirror.value.returnType).docName;
+  Typedef._(TypedefMirror mirror, Library owningLibrary) :
+      super(mirror, owningLibrary) {
+    returnType = Indexable.getDocgenObject(mirror.value.returnType).docName;
     generics = _createGenerics(mirror);
     parameters = _createParameters(mirror.value.parameters, owningLibrary);
     annotations = _createAnnotations(mirror, owningLibrary);
@@ -1603,32 +1628,33 @@
   };
 
   String get typeName => 'typedef';
+
+  bool _isValidMirror(DeclarationMirror mirror) => mirror is TypedefMirror;
 }
 
 /// A class containing properties of a Dart variable.
-class Variable extends Indexable {
+class Variable extends OwnedIndexable {
 
   bool isFinal;
   bool isStatic;
   bool isConst;
   Type type;
   String _variableName;
-  Indexable owner;
 
   /// List of the meta annotations on the variable.
   List<Annotation> annotations;
 
   factory Variable(String variableName, VariableMirror mirror,
       Indexable owner) {
-    var variable = getDocgenObject(mirror);
+    var variable = Indexable.getDocgenObject(mirror);
     if (variable is DummyMirror) {
       return new Variable._(variableName, mirror, owner);
     }
     return variable;
   }
 
-  Variable._(this._variableName, VariableMirror mirror, this.owner) :
-      super(mirror) {
+  Variable._(this._variableName, VariableMirror mirror, Indexable owner) :
+      super(mirror, owner) {
     isFinal = mirror.isFinal;
     isStatic = mirror.isStatic;
     isConst = mirror.isConst;
@@ -1668,7 +1694,7 @@
     var lookupFunc = Indexable.determineLookupFunc(name);
     var result = lookupFunc(mirror, name);
     if (result != null) {
-      result = getDocgenObject(result);
+      result = Indexable.getDocgenObject(result);
       if (result is DummyMirror) return packagePrefix + result.docName;
       return result.packagePrefix + result.docName;
     }
@@ -1681,10 +1707,12 @@
     }
     return super.findElementInScope(name);
   }
+
+  bool _isValidMirror(DeclarationMirror mirror) => mirror is VariableMirror;
 }
 
 /// A class containing properties of a Dart method.
-class Method extends Indexable {
+class Method extends OwnedIndexable {
 
   /// Parameters for this method.
   Map<String, Parameter> parameters;
@@ -1692,10 +1720,6 @@
   bool isStatic;
   bool isAbstract;
   bool isConst;
-  bool isConstructor;
-  bool isGetter;
-  bool isSetter;
-  bool isOperator;
   Type returnType;
   Method methodInheritedFrom;
 
@@ -1705,29 +1729,23 @@
   /// List of the meta annotations on the method.
   List<Annotation> annotations;
 
-  Indexable owner;
-
   factory Method(MethodMirror mirror, Indexable owner, // Indexable newOwner.
       [Method methodInheritedFrom]) {
-    var method = getDocgenObject(mirror, owner);
+    var method = Indexable.getDocgenObject(mirror, owner);
     if (method is DummyMirror) {
       method = new Method._(mirror, owner, methodInheritedFrom);
     }
     return method;
   }
 
-  Method._(MethodMirror mirror, this.owner, this.methodInheritedFrom)
-      : super(mirror) {
-    this.isStatic = mirror.isStatic;
-    this.isAbstract = mirror.isAbstract;
-    this.isConst = mirror.isConstConstructor;
-    this.returnType = new Type(mirror.returnType, _getOwningLibrary(owner));
-    this.parameters = _createParameters(mirror.parameters, owner);
-    this.annotations = _createAnnotations(mirror, _getOwningLibrary(owner));
-    this.isConstructor = mirror.isConstructor;
-    this.isGetter = mirror.isGetter;
-    this.isSetter = mirror.isSetter;
-    this.isOperator = mirror.isOperator;
+  Method._(MethodMirror mirror, Indexable owner, this.methodInheritedFrom)
+      : super(mirror, owner) {
+    isStatic = mirror.isStatic;
+    isAbstract = mirror.isAbstract;
+    isConst = mirror.isConstConstructor;
+    returnType = new Type(mirror.returnType, _getOwningLibrary(owner));
+    parameters = _createParameters(mirror.parameters, owner);
+    annotations = _createAnnotations(mirror, _getOwningLibrary(owner));
   }
 
   String get packagePrefix => owner.packagePrefix;
@@ -1747,10 +1765,10 @@
       // do we check for a dummy mirror returned here and look up with an owner
       // higher ooooor in getDocgenObject do we include more things in our
       // lookup
-      var result = getDocgenObject(memberScope, owner);
+      var result = Indexable.getDocgenObject(memberScope, owner);
       if (result is DummyMirror && owner.owner != null
           && owner.owner is! DummyMirror) {
-        var aresult = getDocgenObject(memberScope, owner.owner);
+        var aresult = Indexable.getDocgenObject(memberScope, owner.owner);
         if (aresult is! DummyMirror) result = aresult;
       }
       if (result is DummyMirror) return packagePrefix + result.docName;
@@ -1804,9 +1822,14 @@
     'annotations': annotations.map((a) => a.toMap()).toList()
   };
 
-  String get typeName => isConstructor ? 'constructor' :
-    isGetter ? 'getter' : isSetter ? 'setter' :
-    isOperator ? 'operator' : 'method';
+  String get typeName {
+    MethodMirror theMirror = mirror;
+    if (theMirror.isConstructor) return 'constructor';
+    if (theMirror.isGetter) return 'getter';
+    if (theMirror.isSetter) return'setter';
+    if (theMirror.isOperator) return 'operator';
+    return 'method';
+  }
 
   get comment {
     if (_comment != null) return _comment;
@@ -1827,6 +1850,8 @@
     }
     return result;
   }
+
+  bool _isValidMirror(DeclarationMirror mirror) => mirror is MethodMirror;
 }
 
 /// Docgen wrapper around the dart2js mirror for a Dart
@@ -1905,7 +1930,7 @@
 ///                      "inner" :
 class Type extends MirrorBased {
   TypeMirror mirror;
-  MirrorBased owningLibrary;
+  Library owningLibrary;
 
   Type(this.mirror, this.owningLibrary);
 
@@ -1921,12 +1946,15 @@
     return [];
   }
 
-  Map toMap() => {
-    // We may encounter types whose corresponding library has not been
-    // processed yet, so look up with the owningLibrary at the last moment.
-    'outer': getDocgenObject(mirror, owningLibrary).docName,
-    'inner': _createTypeGenerics(mirror).map((e) => e.toMap()).toList(),
-  };
+  Map toMap() {
+    var result = Indexable.getDocgenObject(mirror, owningLibrary);
+    return {
+      // We may encounter types whose corresponding library has not been
+      // processed yet, so look up with the owningLibrary at the last moment.
+      'outer': result.packagePrefix + result.docName,
+      'inner': _createTypeGenerics(mirror).map((e) => e.toMap()).toList(),
+    };
+  }
 }
 
 /// Holds the name of the annotation, and its parameters.
@@ -1946,7 +1974,7 @@
   }
 
   Map toMap() => {
-    'name': getDocgenObject(mirror, owningLibrary).docName,
+    'name': Indexable.getDocgenObject(mirror, owningLibrary).docName,
     'parameters': parameters
   };
 }
\ No newline at end of file
diff --git a/pkg/docgen/test/multi_library_test.dart b/pkg/docgen/test/multi_library_test.dart
index 1346de8..f4d91d9 100644
--- a/pkg/docgen/test/multi_library_test.dart
+++ b/pkg/docgen/test/multi_library_test.dart
@@ -128,7 +128,7 @@
             (dep) => dep.isImport).targetLibrary;
           var aClassMirror = importedLib.classes.values.first;
           expect(aClassMirror.qualifiedName, 'testLib2.foo.B');
-          var exportedClass = getDocgenObject(aClassMirror, library);
+          var exportedClass = Indexable.getDocgenObject(aClassMirror, library);
           expect(exportedClass is Class, isTrue);
 
 
@@ -156,7 +156,7 @@
             'testLib.bar').targetLibrary;
           aClassMirror = importedLib.classes.values.first;
           expect(aClassMirror.qualifiedName, 'testLib.bar.C');
-          exportedClass = getDocgenObject(aClassMirror, library);
+          exportedClass = Indexable.getDocgenObject(aClassMirror, library);
           expect(exportedClass is Class, isTrue);
           expect(exportedClass.docName, 'testLib.C');
 
diff --git a/pkg/docgen/test/single_library_test.dart b/pkg/docgen/test/single_library_test.dart
index ed30818..3ce19a3 100644
--- a/pkg/docgen/test/single_library_test.dart
+++ b/pkg/docgen/test/single_library_test.dart
@@ -104,7 +104,7 @@
           expect(classDocComment, 'test.A');
 
           // Test for linking to parameter [A]
-          var method = getDocgenObject(classMirror.methods['doThis']);
+          var method = Indexable.getDocgenObject(classMirror.methods['doThis']);
           var methodParameterDocComment = method.fixReference(
               'A').children.first.text;
           expect(methodParameterDocComment, 'test.A.doThis.A');
diff --git a/pkg/pkg.status b/pkg/pkg.status
index c2b905f..90c23d2 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -38,6 +38,7 @@
 
 [ $compiler == dart2js && $checked && $runtime == ie9 ]
 crypto/test/base64_test: Timeout # Issue 12486
+collection/test/priority_queue_test: Pass, Slow # Issue 16426
 serialization/test/serialization_test: Skip
 
 [ $runtime == d8 || $runtime == jsshell ]
@@ -95,6 +96,7 @@
 mime/test/mime_multipart_transformer_test: Skip # No typed_data on IE9.
 typed_data/test/typed_buffers_test: Fail, Crash # No typed_data on IE9.
 polymer/test/instance_attrs_test: Pass, Fail # Issue 14167
+polymer/test/bind_mdv_test: Pass, Fail # Issue 16441
 
 [ $runtime == safari ]
 fixnum/test/int_64_test: Pass, Fail # Bug in JSC.
@@ -122,6 +124,8 @@
 unittest/test/mock_regexp_negative_test: Skip
 unittest/test/mock_stepwise_negative_test: Skip
 polymer/example/canonicalization: Skip
+polymer/example/canonicalization2: Skip
+polymer/example/canonicalization3: Skip
 
 third_party/angular_tests/browser_test: StaticWarning # Issue 15890
 
@@ -131,11 +135,15 @@
 unittest/test/mock_regexp_negative_test: Skip
 unittest/test/mock_stepwise_negative_test: Skip
 polymer/example/canonicalization: Skip
+polymer/example/canonicalization2: Skip
+polymer/example/canonicalization3: Skip
 
 third_party/angular_tests/browser_test: StaticWarning # Issue 15890
 
 [ $compiler == dart2js && $runtime == none]
 polymer/example/canonicalization: Skip
+polymer/example/canonicalization2: Skip
+polymer/example/canonicalization3: Skip
 
 [ $compiler == dart2js && $csp ]
 unittest/test/mirror_matchers_test: Skip # Issue 12151
@@ -156,7 +164,11 @@
 crypto/test/sha256_test: Slow, Pass
 crypto/test/sha1_test: Slow, Pass
 polymer/example/component: Fail # Issue 13198
-polymer/example/canonicalization/test/canonicalization_test: Fail, OK # tests development only behavior
+polymer/example/canonicalization/test/dev_test: Fail, OK # tests development only behavior
+polymer/example/canonicalization/test/dev2_test: Fail, OK # tests development only behavior
+polymer/example/canonicalization/test/dev3_test: Fail, OK # tests development only behavior
+polymer/example/canonicalization/test/dir/dev_test: Fail, OK # tests development only behavior
+polymer/example/canonicalization/test/dir/dev2_test: Fail, OK # tests development only behavior
 
 [ $compiler == dart2js && $runtime == chromeOnAndroid ]
 docgen/test/single_library_test: Fail # TODO(kasperl): Please triage.
@@ -259,7 +271,11 @@
 unittest/test/unittest_testcases_immutable_test: Fail # 13921
 unittest/test/unitttest_group_name_test: Fail # 13921
 polymer/test/custom_event_test: Pass, Crash # 14360
-polymer/example/canonicalization/test/canonicalization_deploy_test: Fail, OK # tests deploy only behavior
+polymer/example/canonicalization/test/deploy_test: Fail, OK # tests deploy only behavior
+polymer/example/canonicalization/test/deploy2_test: Fail, OK # tests deploy only behavior
+polymer/example/canonicalization/test/deploy3_test: Fail, OK # tests deploy only behavior
+polymer/example/canonicalization/test/dir/deploy_test: Fail, OK # tests deploy only behavior
+polymer/example/canonicalization/test/dir/deploy2_test: Fail, OK # tests deploy only behavior
 
 [ $compiler == none && ( $runtime == dartium || $runtime == drt ) && $checked ]
 polymer/test/custom_event_test: Skip # http://dartbug.com/15517
diff --git a/pkg/pkgbuild.status b/pkg/pkgbuild.status
index 5288923..3acf8e6 100644
--- a/pkg/pkgbuild.status
+++ b/pkg/pkgbuild.status
@@ -5,7 +5,7 @@
 third_party/pkg/route_hierarchical: Fail
 
 samples/third_party/pop-pop-win: Pass, Slow
-samples/searchable_list: Pass, Slow
+samples/searchable_list: Pass, Slow, Crash # Crashing from issue 16404
 pkg/docgen: Pass, Slow
 
 [ $use_repository_packages ]
@@ -20,3 +20,4 @@
 
 [ $builder_tag == russian ]
 samples/third_party/pop-pop-win: Fail # Issue 16356
+samples/third_party/angular_todo: Fail # Issue 16356
diff --git a/pkg/polymer/example/canonicalization/lib/e.html b/pkg/polymer/example/canonicalization/lib/e.html
new file mode 100644
index 0000000..4a5f8d7
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/lib/e.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<link rel="import" href="b.html">
diff --git a/pkg/polymer/example/canonicalization/lib/f.html b/pkg/polymer/example/canonicalization/lib/f.html
new file mode 100644
index 0000000..2d8a727
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/lib/f.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<link rel="import" href="../../packages/canonicalization/b.html">
diff --git a/pkg/polymer/example/canonicalization/test/deploy2_test.dart b/pkg/polymer/example/canonicalization/test/deploy2_test.dart
new file mode 100644
index 0000000..e2de77d
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/deploy2_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.deploy2_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/deploy2_test.html
similarity index 74%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization/test/deploy2_test.html
index 37bd302..ec45f51 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/deploy2_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <!-- similar to deploy_test, but 'e' imports 'b' -->
+    <link rel="import" href="packages/canonicalization/e.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="deploy2_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/deploy3_test.dart b/pkg/polymer/example/canonicalization/test/deploy3_test.dart
new file mode 100644
index 0000000..705abc8
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/deploy3_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.deploy3_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/deploy3_test.html
similarity index 74%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization/test/deploy3_test.html
index 37bd302..80470b9 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/deploy3_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <!-- similar to deploy_test, but 'f' imports 'b' -->
+    <link rel="import" href="packages/canonicalization/f.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="deploy3_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.dart b/pkg/polymer/example/canonicalization/test/deploy_test.dart
similarity index 100%
rename from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.dart
rename to pkg/polymer/example/canonicalization/test/deploy_test.dart
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/deploy_test.html
similarity index 87%
rename from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
rename to pkg/polymer/example/canonicalization/test/deploy_test.html
index 37bd302..112f400 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/deploy_test.html
@@ -13,6 +13,6 @@
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="deploy_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dev2_test.dart b/pkg/polymer/example/canonicalization/test/dev2_test.dart
new file mode 100644
index 0000000..cbb75d7
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dev2_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works during development. */
+library canonicalization.dev2_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    expect(a, 1, reason:
+      'initPolymer picks the "package:" url as the canonical url for script '
+      'tags whose library is also loaded with a "package:" url.');
+    expect(b, 1, reason:
+      'initPolymer does nothing with script tags where the program doesn\'t '
+      'use a "package:" urls matching the same library.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 1, reason: 'this matches the import from a');
+    expect(d2.d, 1, reason: 'this matches the import from b');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_test.html b/pkg/polymer/example/canonicalization/test/dev2_test.html
similarity index 75%
copy from pkg/polymer/example/canonicalization/test/canonicalization_test.html
copy to pkg/polymer/example/canonicalization/test/dev2_test.html
index 8e94f83..177116d 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_test.html
+++ b/pkg/polymer/example/canonicalization/test/dev2_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization during the development cycle</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <!-- similar to dev_test, but 'e' imports 'b' -->
+    <link rel="import" href="packages/canonicalization/e.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_test.dart"></script>
+    <script type="application/dart" src="dev_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dev3_test.dart b/pkg/polymer/example/canonicalization/test/dev3_test.dart
new file mode 100644
index 0000000..874e8ef
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dev3_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works during development. */
+library canonicalization.dev3_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    expect(a, 1, reason:
+      'initPolymer picks the "package:" url as the canonical url for script '
+      'tags whose library is also loaded with a "package:" url.');
+    expect(b, 1, reason:
+      'initPolymer does nothing with script tags where the program doesn\'t '
+      'use a "package:" urls matching the same library.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 1, reason: 'this matches the import from a');
+    expect(d2.d, 1, reason: 'this matches the import from b');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/dev3_test.html
similarity index 78%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization/test/dev3_test.html
index 37bd302..c77ee28 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/dev3_test.html
@@ -9,10 +9,10 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="packages/canonicalization/f.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="dev3_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_test.dart b/pkg/polymer/example/canonicalization/test/dev_test.dart
similarity index 100%
rename from pkg/polymer/example/canonicalization/test/canonicalization_test.dart
rename to pkg/polymer/example/canonicalization/test/dev_test.dart
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_test.html b/pkg/polymer/example/canonicalization/test/dev_test.html
similarity index 88%
rename from pkg/polymer/example/canonicalization/test/canonicalization_test.html
rename to pkg/polymer/example/canonicalization/test/dev_test.html
index 8e94f83..75b7df6 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_test.html
+++ b/pkg/polymer/example/canonicalization/test/dev_test.html
@@ -13,6 +13,6 @@
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_test.dart"></script>
+    <script type="application/dart" src="dev_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dir/deploy2_test.dart b/pkg/polymer/example/canonicalization/test/dir/deploy2_test.dart
new file mode 100644
index 0000000..0be4dd6
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dir/deploy2_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests canonicalization at deployment time from a subdir. */
+library canonicalization.dir.deploy2_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import '../packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import '../packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/dir/deploy2_test.html
similarity index 69%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization/test/dir/deploy2_test.html
index 37bd302..8c75ad9 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/dir/deploy2_test.html
@@ -8,11 +8,11 @@
 <!--polymer-test: this comment is needed for test_suite.dart-->
   <head>
     <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="../packages/canonicalization/a.html">
+    <link rel="import" href="../packages/canonicalization/b.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="deploy2_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dir/deploy_test.dart b/pkg/polymer/example/canonicalization/test/dir/deploy_test.dart
new file mode 100644
index 0000000..bff91d6
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dir/deploy_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests canonicalization at deployment time from a subdir. */
+library canonicalization.dir.deploy_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization/test/dir/deploy_test.html
similarity index 87%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization/test/dir/deploy_test.html
index 37bd302..112f400 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization/test/dir/deploy_test.html
@@ -13,6 +13,6 @@
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" src="deploy_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dir/dev2_test.dart b/pkg/polymer/example/canonicalization/test/dir/dev2_test.dart
new file mode 100644
index 0000000..c8a34fe
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dir/dev2_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests canonicalization during development from a subdir. */
+library canonicalization.dir.dev2_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import '../packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import '../packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    expect(a, 1, reason:
+      'initPolymer picks the "package:" url as the canonical url for script '
+      'tags whose library is also loaded with a "package:" url.');
+    expect(b, 1, reason:
+      'initPolymer does nothing with script tags where the program doesn\'t '
+      'use a "package:" urls matching the same library.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 1, reason: 'this matches the import from a');
+    expect(d2.d, 1, reason: 'this matches the import from b');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_test.html b/pkg/polymer/example/canonicalization/test/dir/dev2_test.html
similarity index 70%
copy from pkg/polymer/example/canonicalization/test/canonicalization_test.html
copy to pkg/polymer/example/canonicalization/test/dir/dev2_test.html
index 8e94f83..aebe32b 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_test.html
+++ b/pkg/polymer/example/canonicalization/test/dir/dev2_test.html
@@ -8,11 +8,11 @@
 <!--polymer-test: this comment is needed for test_suite.dart-->
   <head>
     <title>Tests canonicalization during the development cycle</title>
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="../packages/canonicalization/a.html">
+    <link rel="import" href="../packages/canonicalization/b.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_test.dart"></script>
+    <script type="application/dart" src="dev2_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization/test/dir/dev_test.dart b/pkg/polymer/example/canonicalization/test/dir/dev_test.dart
new file mode 100644
index 0000000..884a30b
--- /dev/null
+++ b/pkg/polymer/example/canonicalization/test/dir/dev_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests canonicalization during development from a subdir. */
+library canonicalization.dir.dev_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    expect(a, 1, reason:
+      'initPolymer picks the "package:" url as the canonical url for script '
+      'tags whose library is also loaded with a "package:" url.');
+    expect(b, 1, reason:
+      'initPolymer does nothing with script tags where the program doesn\'t '
+      'use a "package:" urls matching the same library.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 1, reason: 'this matches the import from a');
+    expect(d2.d, 1, reason: 'this matches the import from b');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_test.html b/pkg/polymer/example/canonicalization/test/dir/dev_test.html
similarity index 88%
copy from pkg/polymer/example/canonicalization/test/canonicalization_test.html
copy to pkg/polymer/example/canonicalization/test/dir/dev_test.html
index 8e94f83..75b7df6 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_test.html
+++ b/pkg/polymer/example/canonicalization/test/dir/dev_test.html
@@ -13,6 +13,6 @@
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_test.dart"></script>
+    <script type="application/dart" src="dev_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization2/lib/a.dart b/pkg/polymer/example/canonicalization2/lib/a.dart
new file mode 100644
index 0000000..78426db
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/a.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.a;
+
+import 'package:polymer/polymer.dart';
+import 'package:canonicalization/c.dart';
+import 'd.dart';
+
+int a = 0;
+@initMethod _init() {
+  a++;
+  c++;
+  d++;
+}
diff --git a/pkg/polymer/example/canonicalization2/lib/a.html b/pkg/polymer/example/canonicalization2/lib/a.html
new file mode 100644
index 0000000..c359e83
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/a.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<script type='application/dart' src='a.dart'></script>
diff --git a/pkg/polymer/example/canonicalization2/lib/b.dart b/pkg/polymer/example/canonicalization2/lib/b.dart
new file mode 100644
index 0000000..0a3a29d
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/b.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.b;
+
+import 'package:polymer/polymer.dart';
+import 'package:canonicalization/c.dart';
+import 'd.dart';
+
+int b = 0;
+@initMethod _init() {
+  b++;
+  c++;
+  d++;
+}
diff --git a/pkg/polymer/example/canonicalization2/lib/b.html b/pkg/polymer/example/canonicalization2/lib/b.html
new file mode 100644
index 0000000..2a42437
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/b.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<script type='application/dart' src='b.dart'></script>
diff --git a/pkg/polymer/example/canonicalization2/lib/c.dart b/pkg/polymer/example/canonicalization2/lib/c.dart
new file mode 100644
index 0000000..362f3e3
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/c.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.c;
+
+int c = 0;
diff --git a/pkg/polymer/example/canonicalization2/lib/d.dart b/pkg/polymer/example/canonicalization2/lib/d.dart
new file mode 100644
index 0000000..7d2a58e
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/d.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.d;
+
+int d = 0;
diff --git a/pkg/polymer/example/canonicalization2/lib/g.html b/pkg/polymer/example/canonicalization2/lib/g.html
new file mode 100644
index 0000000..1b9e8d2
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/lib/g.html
@@ -0,0 +1,10 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<!--
+Because this file is under lib/, this URL is broken. It should be either
+'b.html' or '../../packages/canonicalization/b.html'.
+ -->
+<link rel="import" href="../packages/canonicalization/b.html">
diff --git a/pkg/polymer/example/canonicalization2/pubspec.yaml b/pkg/polymer/example/canonicalization2/pubspec.yaml
new file mode 100644
index 0000000..868710f
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/pubspec.yaml
@@ -0,0 +1,6 @@
+name: canonicalization2
+dependencies:
+  polymer:
+    path: ../../
+dev_dependencies:
+  unittest: any
diff --git a/pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.dart b/pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.dart
new file mode 100644
index 0000000..2976e6a
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.dev3_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.html
similarity index 73%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.html
index 37bd302..4d47f9f 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization2/test/bad_lib_import2_negative_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="packages/canonicalization/g.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
+        src="bad_lib_import2_negative_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.dart b/pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.dart
new file mode 100644
index 0000000..0b1bb97
--- /dev/null
+++ b/pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.bad_lib_import_negative;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.html
similarity index 73%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.html
index 37bd302..7794c2a 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization2/test/bad_lib_import_negative_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="packages/canonicalization/g.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
+        src="bad_lib_import_negative_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization3/lib/a.dart b/pkg/polymer/example/canonicalization3/lib/a.dart
new file mode 100644
index 0000000..78426db
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/a.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.a;
+
+import 'package:polymer/polymer.dart';
+import 'package:canonicalization/c.dart';
+import 'd.dart';
+
+int a = 0;
+@initMethod _init() {
+  a++;
+  c++;
+  d++;
+}
diff --git a/pkg/polymer/example/canonicalization3/lib/a.html b/pkg/polymer/example/canonicalization3/lib/a.html
new file mode 100644
index 0000000..c359e83
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/a.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<script type='application/dart' src='a.dart'></script>
diff --git a/pkg/polymer/example/canonicalization3/lib/b.dart b/pkg/polymer/example/canonicalization3/lib/b.dart
new file mode 100644
index 0000000..0a3a29d
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/b.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.b;
+
+import 'package:polymer/polymer.dart';
+import 'package:canonicalization/c.dart';
+import 'd.dart';
+
+int b = 0;
+@initMethod _init() {
+  b++;
+  c++;
+  d++;
+}
diff --git a/pkg/polymer/example/canonicalization3/lib/b.html b/pkg/polymer/example/canonicalization3/lib/b.html
new file mode 100644
index 0000000..2a42437
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/b.html
@@ -0,0 +1,6 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<script type='application/dart' src='b.dart'></script>
diff --git a/pkg/polymer/example/canonicalization3/lib/c.dart b/pkg/polymer/example/canonicalization3/lib/c.dart
new file mode 100644
index 0000000..362f3e3
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/c.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.c;
+
+int c = 0;
diff --git a/pkg/polymer/example/canonicalization3/lib/d.dart b/pkg/polymer/example/canonicalization3/lib/d.dart
new file mode 100644
index 0000000..7d2a58e
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/d.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library canonicalization.d;
+
+int d = 0;
diff --git a/pkg/polymer/example/canonicalization3/lib/g.html b/pkg/polymer/example/canonicalization3/lib/g.html
new file mode 100644
index 0000000..af83397
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/lib/g.html
@@ -0,0 +1,10 @@
+<!--
+Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<!--
+Because this file is under lib/, this URL is broken. It should be either
+'b.html' or '../../packages/canonicalization/b.html'.
+ -->
+<link rel="import" href="packages/canonicalization/b.html">
diff --git a/pkg/polymer/example/canonicalization3/pubspec.yaml b/pkg/polymer/example/canonicalization3/pubspec.yaml
new file mode 100644
index 0000000..c11ac90
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/pubspec.yaml
@@ -0,0 +1,6 @@
+name: canonicalization3
+dependencies:
+  polymer:
+    path: ../../
+dev_dependencies:
+  unittest: any
diff --git a/pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.dart b/pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.dart
new file mode 100644
index 0000000..2976e6a
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.dev3_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.html
similarity index 73%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.html
index 37bd302..4d47f9f 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization3/test/bad_lib_import2_negative_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="packages/canonicalization/g.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
+        src="bad_lib_import2_negative_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.dart b/pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.dart
new file mode 100644
index 0000000..0b1bb97
--- /dev/null
+++ b/pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** Tests how canonicalization works when using the deployed app. */
+library canonicalization.bad_lib_import_negative;
+
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+import 'package:canonicalization/a.dart';
+import 'packages/canonicalization/b.dart';
+import 'package:canonicalization/c.dart';
+import 'package:canonicalization/d.dart' as d1;
+import 'packages/canonicalization/d.dart' as d2;
+
+main() {
+  initPolymer();
+  useHtmlConfiguration();
+
+  setUp(() => Polymer.onReady);
+
+  test('canonicalization', () {
+    // "package:" urls work the same during development and deployment
+    expect(a, 1, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+
+    // relative urls do not. true, we shouldn't be using 'packages/' above, so
+    // that's ok.
+    expect(b, 0, reason:
+      'deploy picks the "package:" url as the canonical url for script tags.');
+    expect(c, 2, reason: 'c was always imported with "package:" urls.');
+    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
+
+    // same here
+    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
+  });
+}
diff --git a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html b/pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.html
similarity index 73%
copy from pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
copy to pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.html
index 37bd302..7794c2a 100644
--- a/pkg/polymer/example/canonicalization/test/canonicalization_deploy_test.html
+++ b/pkg/polymer/example/canonicalization3/test/bad_lib_import_negative_test.html
@@ -9,10 +9,11 @@
   <head>
     <title>Tests canonicalization at deployment time</title>
     <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
+    <link rel="import" href="packages/canonicalization/g.html">
     <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
   </head>
   <body>
-    <script type="application/dart" src="canonicalization_deploy_test.dart"></script>
+    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
+        src="bad_lib_import_negative_test.dart"></script>
   </body>
 </html>
diff --git a/pkg/polymer/lib/src/build/common.dart b/pkg/polymer/lib/src/build/common.dart
index ebedf23..1b27f55 100644
--- a/pkg/polymer/lib/src/build/common.dart
+++ b/pkg/polymer/lib/src/build/common.dart
@@ -6,6 +6,7 @@
 library polymer.src.build.common;
 
 import 'dart:async';
+import 'dart:math' show min, max;
 
 import 'package:barback/barback.dart';
 import 'package:html5lib/dom.dart' show Document;
@@ -127,26 +128,47 @@
     return null;
   }
 
-  var segments = urlBuilder.split(url);
-  var prefix = segments[0];
-  var entryFolder = !source.path.startsWith('lib/') &&
-      !source.path.startsWith('asset/');
-
-  // URLs of the form "packages/foo/bar" seen under entry folders (like web/,
-  // test/, example/, etc) are resolved as an asset in another package.
-  if (entryFolder && (prefix == 'packages' || prefix == 'assets')) {
-    return _extractOtherPackageId(0, segments, logger, span);
-  }
-
   var targetPath = urlBuilder.normalize(
       urlBuilder.join(urlBuilder.dirname(source.path), url));
+  var segments = urlBuilder.split(targetPath);
+  var sourceSegments = urlBuilder.split(source.path);
+  assert (sourceSegments.length > 0);
+  var topFolder = sourceSegments[0];
+  var entryFolder = topFolder != 'lib' && topFolder != 'asset';
 
-  // Relative URLs of the form "../../packages/foo/bar" in an asset under lib/
-  // or asset/ are also resolved as an asset in another package.
-  segments = urlBuilder.split(targetPath);
-  if (!entryFolder && segments.length > 1 && segments[0] == '..' &&
-      (segments[1] == 'packages' || segments[1] == 'assets')) {
-    return _extractOtherPackageId(1, segments, logger, span);
+  // Find the first 'packages/'  or 'assets/' segment:
+  var packagesIndex = segments.indexOf('packages');
+  var assetsIndex = segments.indexOf('assets');
+  var index = (packagesIndex >= 0 && assetsIndex >= 0)
+      ? min(packagesIndex, assetsIndex)
+      : max(packagesIndex, assetsIndex);
+  if (index > -1) {
+    if (entryFolder) {
+      // URLs of the form "packages/foo/bar" seen under entry folders (like
+      // web/, test/, example/, etc) are resolved as an asset in another
+      // package. 'packages' can be used anywhere, there is no need to walk up
+      // where the entrypoint file was.
+      return _extractOtherPackageId(index, segments, logger, span);
+    } else if (index == 1 && segments[0] == '..') {
+      // Relative URLs of the form "../../packages/foo/bar" in an asset under
+      // lib/ or asset/ are also resolved as an asset in another package, but we
+      // check that the relative path goes all the way out where the packages
+      // folder lives (otherwise the app would not work in Dartium). Since
+      // [targetPath] has been normalized, "packages" or "assets" should be at
+      // index 1.
+      return _extractOtherPackageId(1, segments, logger, span);
+    } else {
+      var prefix = segments[index];
+      var fixedSegments = [];
+      fixedSegments.addAll(sourceSegments.map((_) => '..'));
+      fixedSegments.addAll(segments.sublist(index));
+      var fixedUrl = urlBuilder.joinAll(fixedSegments);
+      logger.error('Invalid url to reach to another package: $url. Path '
+          'reaching to other packages must first reach up all the '
+          'way to the $prefix folder. For example, try changing the url above '
+          'to: $fixedUrl', span: span);
+      return null;
+    }
   }
 
   // Otherwise, resolve as a path in the same package.
diff --git a/pkg/polymer/lib/src/build/import_inliner.dart b/pkg/polymer/lib/src/build/import_inliner.dart
index 79298c1..a66d1bb 100644
--- a/pkg/polymer/lib/src/build/import_inliner.dart
+++ b/pkg/polymer/lib/src/build/import_inliner.dart
@@ -182,6 +182,7 @@
     if (path.isAbsolute(href)) return href;
 
     var id = resolve(sourceId, href, transform.logger, span);
+    if (id == null) return href;
     var primaryId = transform.primaryInput.id;
 
     if (id.path.startsWith('lib/')) {
diff --git a/pkg/polymer/lib/src/loader.dart b/pkg/polymer/lib/src/loader.dart
index 48085e3..28adf3d 100644
--- a/pkg/polymer/lib/src/loader.dart
+++ b/pkg/polymer/lib/src/loader.dart
@@ -138,12 +138,17 @@
 // root library (see dartbug.com/12612)
 final _rootUri = currentMirrorSystem().isolate.rootLibrary.uri;
 
-final String _packageRoot =
-    path.url.join(path.url.dirname(Uri.parse(window.location.href).path),
-        'packages') + '/';
-
 final Logger _loaderLog = new Logger('polymer.loader');
 
+bool _isHttpStylePackageUrl(Uri uri) {
+  var uriPath = uri.path;
+  return uri.scheme == _rootUri.scheme &&
+      // Don't process cross-domain uris.
+      uri.authority == _rootUri.authority &&
+      uriPath.endsWith('.dart') &&
+      (uriPath.contains('/packages/') || uriPath.startsWith('packages/'));
+}
+
 /**
  * Reads the library at [uriString] (which can be an absolute URI or a relative
  * URI from the root library), and:
@@ -157,10 +162,17 @@
 void _loadLibrary(String uriString) {
   var uri = _rootUri.resolve(uriString);
   var lib = _libs[uri];
-  if (uri.path.startsWith(_packageRoot) && uri.path.endsWith('.dart')) {
-    var packageUri =
-        Uri.parse('package:${uri.path.substring(_packageRoot.length)}');
-    var canonicalLib = _libs[packageUri];
+  if (_isHttpStylePackageUrl(uri)) {
+    // Use package: urls if available. This rule here is more permissive than
+    // how we translate urls in polymer-build, but we expect Dartium to limit
+    // the cases where there are differences. The polymer-build issues an error
+    // when using packages/ inside lib without properly stepping out all the way
+    // to the packages folder. If users don't create symlinks in the source
+    // tree, then Dartium will also complain because it won't find the file seen
+    // in an HTML import.
+    var packagePath = uri.path.substring(
+        uri.path.lastIndexOf('packages/') + 'packages/'.length);
+    var canonicalLib = _libs[Uri.parse('package:$packagePath')];
     if (canonicalLib != null) {
       lib = canonicalLib;
     }
diff --git a/pkg/polymer/pubspec.yaml b/pkg/polymer/pubspec.yaml
index f52c8f8..7a3ab81 100644
--- a/pkg/polymer/pubspec.yaml
+++ b/pkg/polymer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: polymer
-version: 0.9.4
+version: 0.9.5-dev
 author: Polymer.dart Authors <web-ui-dev@dartlang.org>
 description: >
   Polymer.dart is a new type of library for the web, built on top of Web
diff --git a/pkg/polymer_expressions/lib/tokenizer.dart b/pkg/polymer_expressions/lib/tokenizer.dart
index 6d3f2c9..fb66087 100644
--- a/pkg/polymer_expressions/lib/tokenizer.dart
+++ b/pkg/polymer_expressions/lib/tokenizer.dart
@@ -13,6 +13,7 @@
 const int _BANG = 33;
 const int _DQ = 34;
 const int _$ = 36;
+const int _PERCENT = 37;
 const int _AMPERSAND = 38;
 const int _SQ = 39;
 const int _OPEN_PAREN = 40;
@@ -50,7 +51,7 @@
 const int _NBSP = 160;
 
 const _OPERATORS = const [_PLUS, _MINUS, _STAR, _SLASH, _BANG, _AMPERSAND,
-                          /*_COMMA,*/ _LT, _EQ, _GT, _QUESTION, _CARET, _BAR];
+                          _PERCENT, _LT, _EQ, _GT, _QUESTION, _CARET, _BAR];
 
 const _GROUPERS = const [_OPEN_PAREN, _CLOSE_PAREN,
                          _OPEN_SQUARE_BRACKET, _CLOSE_SQUARE_BRACKET,
diff --git a/pkg/polymer_expressions/test/parser_test.dart b/pkg/polymer_expressions/test/parser_test.dart
index f943d22..e57d11a 100644
--- a/pkg/polymer_expressions/test/parser_test.dart
+++ b/pkg/polymer_expressions/test/parser_test.dart
@@ -52,15 +52,14 @@
       expectParse('-1.23', literal(-1.23));
     });
 
-    test('should parse a plus operator with literals', () {
-      expectParse('1 + 2', binary(literal(1), '+', literal(2)));
-    });
-
     test('should parse binary operators', () {
-      expectParse('a && b', binary(ident('a'), '&&', ident('b')));
-      expectParse('1 && 2', binary(literal(1), '&&', literal(2)));
-      expectParse('false && true', binary(literal(false), '&&', literal(true)));
-      expectParse('false || true', binary(literal(false), '||', literal(true)));
+      var operators = ['+', '-', '*', '/', '%', '^', '==', '!=', '>', '<',
+          '>=', '<=', '||', '&&', '&'];
+      for (var op in operators) {
+        expectParse('a $op b', binary(ident('a'), op, ident('b')));
+        expectParse('1 $op 2', binary(literal(1), op, literal(2)));
+        expectParse('this $op null', binary(ident('this'), op, literal(null)));
+      }
     });
 
     test('should give multiply higher associativity than plus', () {
@@ -71,14 +70,6 @@
               binary(ident('b'), '*', ident('c'))));
     });
 
-    test('should give multiply higher associativity than plus 2', () {
-      expectParse('a * b + c',
-          binary(
-              binary(ident('a'), '*', ident('b')),
-              '+',
-              ident('c')));
-    });
-
     test('should parse a dot operator', () {
       expectParse('a.b', getter(ident('a'), 'b'));
     });
diff --git a/pkg/shadow_dom/REVISIONS b/pkg/shadow_dom/REVISIONS
new file mode 100644
index 0000000..6b8b65f
--- /dev/null
+++ b/pkg/shadow_dom/REVISIONS
@@ -0,0 +1,5 @@
+ 
+  ShadowDOM is at revision 3d48070b83678bcf10ee45e1604ace2c80f26a15 
+  observe-js is at revision 0152d542350239563d0f2cad39d22d3254bd6c2a 
+  WeakMap is at revision a0947a9a0f58f5733f464755c3b86de624b00a5d 
+  platform-dev is at revision 1cc5f8d38cdc93ea994e28463f3381b873f28ea7
diff --git a/pkg/shadow_dom/lib/shadow_dom.debug.js b/pkg/shadow_dom/lib/shadow_dom.debug.js
index f86df70..f411852 100644
--- a/pkg/shadow_dom/lib/shadow_dom.debug.js
+++ b/pkg/shadow_dom/lib/shadow_dom.debug.js
@@ -197,7 +197,7 @@
       this.push(part);
     }, this);
 
-    if (hasEval && !hasObserve && this.length) {
+    if (hasEval && this.length) {
       this.getValueFrom = this.compiledGetValueFromFn();
     }
   }
@@ -235,17 +235,25 @@
       return this.join('.');
     },
 
-    getValueFrom: function(obj, observedSet) {
+    getValueFrom: function(obj, directObserver) {
       for (var i = 0; i < this.length; i++) {
         if (obj == null)
           return;
-        if (observedSet)
-          observedSet.observe(obj);
         obj = obj[this[i]];
       }
       return obj;
     },
 
+    iterateObjects: function(obj, observe) {
+      for (var i = 0; i < this.length; i++) {
+        if (i)
+          obj = obj[this[i - 1]];
+        if (!obj)
+          return;
+        observe(obj);
+      }
+    },
+
     compiledGetValueFromFn: function() {
       var accessors = this.map(function(ident) {
         return isIndex(ident) ? '["' + ident + '"]' : '.' + ident;
@@ -294,12 +302,13 @@
 
   function dirtyCheck(observer) {
     var cycles = 0;
-    while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check()) {
-      observer.report();
+    while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {
       cycles++;
     }
     if (global.testingExposeCycleCount)
       global.dirtyCheckCycleCount = cycles;
+
+    return cycles > 0;
   }
 
   function objectIsEmpty(object) {
@@ -352,104 +361,280 @@
     };
   }
 
-  function copyObject(object, opt_copy) {
-    var copy = opt_copy || (Array.isArray(object) ? [] : {});
-    for (var prop in object) {
-      copy[prop] = object[prop];
-    };
-    if (Array.isArray(object))
-      copy.length = object.length;
-    return copy;
+  var eomTasks = [];
+  function runEOMTasks() {
+    if (!eomTasks.length)
+      return false;
+
+    for (var i = 0; i < eomTasks.length; i++) {
+      eomTasks[i]();
+    }
+    eomTasks.length = 0;
+    return true;
   }
 
-  function Observer(object, callback, target, token) {
-    this.closed = false;
-    this.object = object;
-    this.callback = callback;
-    // TODO(rafaelw): Hold this.target weakly when WeakRef is available.
-    this.target = target;
-    this.token = token;
-    this.reporting = true;
-    if (hasObserve) {
-      var self = this;
-      this.boundInternalCallback = function(records) {
-        self.internalCallback(records);
-      };
+  var runEOM = hasObserve ? (function(){
+    var eomObj = { pingPong: true };
+    var eomRunScheduled = false;
+
+    Object.observe(eomObj, function() {
+      runEOMTasks();
+      eomRunScheduled = false;
+    });
+
+    return function(fn) {
+      eomTasks.push(fn);
+      if (!eomRunScheduled) {
+        eomRunScheduled = true;
+        eomObj.pingPong = !eomObj.pingPong;
+      }
+    };
+  })() :
+  (function() {
+    return function(fn) {
+      eomTasks.push(fn);
+    };
+  })();
+
+  var observedObjectCache = [];
+
+  function newObservedObject() {
+    var observer;
+    var object;
+    var discardRecords = false;
+    var first = true;
+
+    function callback(records) {
+      if (observer && observer.state_ === OPENED && !discardRecords)
+        observer.check_(records);
     }
 
-    addToAll(this);
+    return {
+      open: function(obs) {
+        if (observer)
+          throw Error('ObservedObject in use');
+
+        if (!first)
+          Object.deliverChangeRecords(callback);
+
+        observer = obs;
+        first = false;
+      },
+      observe: function(obj, arrayObserve) {
+        object = obj;
+        if (arrayObserve)
+          Array.observe(object, callback);
+        else
+          Object.observe(object, callback);
+      },
+      deliver: function(discard) {
+        discardRecords = discard;
+        Object.deliverChangeRecords(callback);
+        discardRecords = false;
+      },
+      close: function() {
+        observer = undefined;
+        Object.unobserve(object, callback);
+        observedObjectCache.push(this);
+      }
+    };
+  }
+
+  function getObservedObject(observer, object, arrayObserve) {
+    var dir = observedObjectCache.pop() || newObservedObject();
+    dir.open(observer);
+    dir.observe(object, arrayObserve);
+    return dir;
+  }
+
+  var emptyArray = [];
+  var observedSetCache = [];
+
+  function newObservedSet() {
+    var observers = [];
+    var observerCount = 0;
+    var objects = [];
+    var toRemove = emptyArray;
+    var resetNeeded = false;
+    var resetScheduled = false;
+
+    function observe(obj) {
+      if (!isObject(obj))
+        return;
+
+      var index = toRemove.indexOf(obj);
+      if (index >= 0) {
+        toRemove[index] = undefined;
+        objects.push(obj);
+      } else if (objects.indexOf(obj) < 0) {
+        objects.push(obj);
+        Object.observe(obj, callback);
+      }
+
+      observe(Object.getPrototypeOf(obj));
+    }
+
+    function reset() {
+      resetScheduled = false;
+      if (!resetNeeded)
+        return;
+
+      var objs = toRemove === emptyArray ? [] : toRemove;
+      toRemove = objects;
+      objects = objs;
+
+      var observer;
+      for (var id in observers) {
+        observer = observers[id];
+        if (!observer || observer.state_ != OPENED)
+          continue;
+
+        observer.iterateObjects_(observe);
+      }
+
+      for (var i = 0; i < toRemove.length; i++) {
+        var obj = toRemove[i];
+        if (obj)
+          Object.unobserve(obj, callback);
+      }
+
+      toRemove.length = 0;
+    }
+
+    function scheduleReset() {
+      if (resetScheduled)
+        return;
+
+      resetNeeded = true;
+      resetScheduled = true;
+      runEOM(reset);
+    }
+
+    function callback() {
+      var observer;
+
+      for (var id in observers) {
+        observer = observers[id];
+        if (!observer || observer.state_ != OPENED)
+          continue;
+
+        observer.check_();
+      }
+
+      scheduleReset();
+    }
+
+    var record = {
+      object: undefined,
+      objects: objects,
+      open: function(obs) {
+        observers[obs.id_] = obs;
+        observerCount++;
+        obs.iterateObjects_(observe);
+      },
+      close: function(obs) {
+        var anyLeft = false;
+
+        observers[obs.id_] = undefined;
+        observerCount--;
+
+        if (observerCount) {
+          scheduleReset();
+          return;
+        }
+        resetNeeded = false;
+
+        for (var i = 0; i < objects.length; i++) {
+          Object.unobserve(objects[i], callback);
+          Observer.unobservedCount++;
+        }
+
+        observers.length = 0;
+        objects.length = 0;
+        observedSetCache.push(this);
+      },
+      reset: scheduleReset
+    };
+
+    return record;
+  }
+
+  var lastObservedSet;
+
+  function getObservedSet(observer, obj) {
+    if (!lastObservedSet || lastObservedSet.object !== obj) {
+      lastObservedSet = observedSetCache.pop() || newObservedSet();
+      lastObservedSet.object = obj;
+    }
+    lastObservedSet.open(observer);
+    return lastObservedSet;
+  }
+
+  var UNOPENED = 0;
+  var OPENED = 1;
+  var CLOSED = 2;
+  var RESETTING = 3;
+
+  var nextObserverId = 1;
+
+  function Observer() {
+    this.state_ = UNOPENED;
+    this.callback_ = undefined;
+    this.target_ = undefined; // TODO(rafaelw): Should be WeakRef
+    this.directObserver_ = undefined;
+    this.value_ = undefined;
+    this.id_ = nextObserverId++;
   }
 
   Observer.prototype = {
-    internalCallback: function(records) {
-      if (this.closed)
-        return;
-      if (this.reporting && this.check(records)) {
-        this.report();
-        if (this.testingResults)
-          this.testingResults.anyChanged = true;
-      }
+    open: function(callback, target) {
+      if (this.state_ != UNOPENED)
+        throw Error('Observer has already been opened.');
+
+      addToAll(this);
+      this.callback_ = callback;
+      this.target_ = target;
+      this.state_ = OPENED;
+      this.connect_();
+      return this.value_;
     },
 
     close: function() {
-      if (this.closed)
-        return;
-      if (this.object && typeof this.object.close === 'function')
-        this.object.close();
-
-      this.disconnect();
-      this.object = undefined;
-      this.closed = true;
-    },
-
-    deliver: function(testingResults) {
-      if (this.closed)
-        return;
-      if (hasObserve) {
-        this.testingResults = testingResults;
-        Object.deliverChangeRecords(this.boundInternalCallback);
-        this.testingResults = undefined;
-      } else {
-        dirtyCheck(this);
-      }
-    },
-
-    report: function() {
-      if (!this.reporting)
+      if (this.state_ != OPENED)
         return;
 
-      this.sync(false);
-      if (this.callback) {
-        this.reportArgs.push(this.token);
-        this.invokeCallback(this.reportArgs);
-      }
-      this.reportArgs = undefined;
+      removeFromAll(this);
+      this.state_ = CLOSED;
+      this.disconnect_();
+      this.value_ = undefined;
+      this.callback_ = undefined;
+      this.target_ = undefined;
     },
 
-    invokeCallback: function(args) {
+    deliver: function() {
+      if (this.state_ != OPENED)
+        return;
+
+      dirtyCheck(this);
+    },
+
+    report_: function(changes) {
       try {
-        this.callback.apply(this.target, args);
+        this.callback_.apply(this.target_, changes);
       } catch (ex) {
         Observer._errorThrownDuringCallback = true;
-        console.error('Exception caught during observer callback: ' + (ex.stack || ex));
+        console.error('Exception caught during observer callback: ' +
+                       (ex.stack || ex));
       }
     },
 
-    reset: function() {
-      if (this.closed)
-        return;
-
-      if (hasObserve) {
-        this.reporting = false;
-        Object.deliverChangeRecords(this.boundInternalCallback);
-        this.reporting = true;
-      }
-
-      this.sync(true);
+    discardChanges: function() {
+      this.check_(undefined, true);
+      return this.value_;
     }
   }
 
-  var collectObservers = !hasObserve || global.forceCollectObservers;
+  var collectObservers = !hasObserve;
   var allObservers;
   Observer._allObserversCount = 0;
 
@@ -458,11 +643,15 @@
   }
 
   function addToAll(observer) {
+    Observer._allObserversCount++;
     if (!collectObservers)
       return;
 
     allObservers.push(observer);
-    Observer._allObserversCount++;
+  }
+
+  function removeFromAll(observer) {
+    Observer._allObserversCount--;
   }
 
   var runningMicrotaskCheckpoint = false;
@@ -486,34 +675,31 @@
     runningMicrotaskCheckpoint = true;
 
     var cycles = 0;
-    var results = {};
+    var anyChanged, toCheck;
 
     do {
       cycles++;
-      var toCheck = allObservers;
+      toCheck = allObservers;
       allObservers = [];
-      results.anyChanged = false;
+      anyChanged = false;
 
       for (var i = 0; i < toCheck.length; i++) {
         var observer = toCheck[i];
-        if (observer.closed)
+        if (observer.state_ != OPENED)
           continue;
 
-        if (hasObserve) {
-          observer.deliver(results);
-        } else if (observer.check()) {
-          results.anyChanged = true;
-          observer.report();
-        }
+        if (observer.check_())
+          anyChanged = true;
 
         allObservers.push(observer);
       }
-    } while (cycles < MAX_DIRTY_CHECK_CYCLES && results.anyChanged);
+      if (runEOMTasks())
+        anyChanged = true;
+    } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);
 
     if (global.testingExposeCycleCount)
       global.dirtyCheckCycleCount = cycles;
 
-    Observer._allObserversCount = allObservers.length;
     runningMicrotaskCheckpoint = false;
   };
 
@@ -523,26 +709,38 @@
     };
   }
 
-  function ObjectObserver(object, callback, target, token) {
-    Observer.call(this, object, callback, target, token);
-    this.connect();
-    this.sync(true);
+  function ObjectObserver(object) {
+    Observer.call(this);
+    this.value_ = object;
+    this.oldObject_ = undefined;
   }
 
   ObjectObserver.prototype = createObject({
     __proto__: Observer.prototype,
 
-    connect: function() {
-      if (hasObserve)
-        Object.observe(this.object, this.boundInternalCallback);
+    arrayObserve: false,
+
+    connect_: function(callback, target) {
+      if (hasObserve) {
+        this.directObserver_ = getObservedObject(this, this.value_,
+                                                 this.arrayObserve);
+      } else {
+        this.oldObject_ = this.copyObject(this.value_);
+      }
+
     },
 
-    sync: function(hard) {
-      if (!hasObserve)
-        this.oldObject = copyObject(this.object);
+    copyObject: function(object) {
+      var copy = Array.isArray(object) ? [] : {};
+      for (var prop in object) {
+        copy[prop] = object[prop];
+      };
+      if (Array.isArray(object))
+        copy.length = object.length;
+      return copy;
     },
 
-    check: function(changeRecords) {
+    check_: function(changeRecords, skipChanges) {
       var diff;
       var oldValues;
       if (hasObserve) {
@@ -550,67 +748,94 @@
           return false;
 
         oldValues = {};
-        diff = diffObjectFromChangeRecords(this.object, changeRecords,
+        diff = diffObjectFromChangeRecords(this.value_, changeRecords,
                                            oldValues);
       } else {
-        oldValues = this.oldObject;
-        diff = diffObjectFromOldObject(this.object, this.oldObject);
+        oldValues = this.oldObject_;
+        diff = diffObjectFromOldObject(this.value_, this.oldObject_);
       }
 
       if (diffIsEmpty(diff))
         return false;
 
-      this.reportArgs =
-          [diff.added || {}, diff.removed || {}, diff.changed || {}];
-      this.reportArgs.push(function(property) {
-        return oldValues[property];
-      });
+      if (!hasObserve)
+        this.oldObject_ = this.copyObject(this.value_);
+
+      this.report_([
+        diff.added || {},
+        diff.removed || {},
+        diff.changed || {},
+        function(property) {
+          return oldValues[property];
+        }
+      ]);
 
       return true;
     },
 
-    disconnect: function() {
-      if (!hasObserve)
-        this.oldObject = undefined;
-      else if (this.object)
-        Object.unobserve(this.object, this.boundInternalCallback);
+    disconnect_: function() {
+      if (hasObserve) {
+        this.directObserver_.close();
+        this.directObserver_ = undefined;
+      } else {
+        this.oldObject_ = undefined;
+      }
+    },
+
+    deliver: function() {
+      if (this.state_ != OPENED)
+        return;
+
+      if (hasObserve)
+        this.directObserver_.deliver(false);
+      else
+        dirtyCheck(this);
+    },
+
+    discardChanges: function() {
+      if (this.directObserver_)
+        this.directObserver_.deliver(true);
+      else
+        this.oldObject_ = this.copyObject(this.value_);
+
+      return this.value_;
     }
   });
 
-  function ArrayObserver(array, callback, target, token) {
+  function ArrayObserver(array) {
     if (!Array.isArray(array))
       throw Error('Provided object is not an Array');
-    ObjectObserver.call(this, array, callback, target, token);
+    ObjectObserver.call(this, array);
   }
 
   ArrayObserver.prototype = createObject({
+
     __proto__: ObjectObserver.prototype,
 
-    connect: function() {
-      if (hasObserve)
-        Array.observe(this.object, this.boundInternalCallback);
+    arrayObserve: true,
+
+    copyObject: function(arr) {
+      return arr.slice();
     },
 
-    sync: function() {
-      if (!hasObserve)
-        this.oldObject = this.object.slice();
-    },
-
-    check: function(changeRecords) {
+    check_: function(changeRecords) {
       var splices;
       if (hasObserve) {
         if (!changeRecords)
           return false;
-        splices = projectArraySplices(this.object, changeRecords);
+        splices = projectArraySplices(this.value_, changeRecords);
       } else {
-        splices = calcSplices(this.object, 0, this.object.length,
-                              this.oldObject, 0, this.oldObject.length);
+        splices = calcSplices(this.value_, 0, this.value_.length,
+                              this.oldObject_, 0, this.oldObject_.length);
       }
 
       if (!splices || !splices.length)
         return false;
 
-      this.reportArgs = [splices];
+      if (!hasObserve)
+        this.oldObject_ = this.copyObject(this.value_);
+
+      this.report_([splices]);
       return true;
     }
   });
@@ -628,255 +853,247 @@
     });
   };
 
-  function ObservedSet(callback) {
-    this.arr = [];
-    this.callback = callback;
-    this.isObserved = true;
-  }
+  function PathObserver(object, path) {
+    Observer.call(this);
 
-  // TODO(rafaelw): Consider surfacing a way to avoid observing prototype
-  // ancestors which are expected not to change (e.g. Element, Node...).
-  var objProto = Object.getPrototypeOf({});
-  var arrayProto = Object.getPrototypeOf([]);
-  ObservedSet.prototype = {
-    reset: function() {
-      this.isObserved = !this.isObserved;
-    },
-
-    observe: function(obj) {
-      if (!isObject(obj) || obj === objProto || obj === arrayProto)
-        return;
-      var i = this.arr.indexOf(obj);
-      if (i >= 0 && this.arr[i+1] === this.isObserved)
-        return;
-
-      if (i < 0) {
-        i = this.arr.length;
-        this.arr[i] = obj;
-        Object.observe(obj, this.callback);
-      }
-
-      this.arr[i+1] = this.isObserved;
-      this.observe(Object.getPrototypeOf(obj));
-    },
-
-    cleanup: function() {
-      var i = 0, j = 0;
-      var isObserved = this.isObserved;
-      while(j < this.arr.length) {
-        var obj = this.arr[j];
-        if (this.arr[j + 1] == isObserved) {
-          if (i < j) {
-            this.arr[i] = obj;
-            this.arr[i + 1] = isObserved;
-          }
-          i += 2;
-        } else {
-          Object.unobserve(obj, this.callback);
-        }
-        j += 2;
-      }
-
-      this.arr.length = i;
-    }
-  };
-
-  function PathObserver(object, path, callback, target, token, valueFn,
-                        setValueFn) {
-    var path = path instanceof Path ? path : getPath(path);
-    if (!path || !path.length || !isObject(object)) {
-      this.value_ = path ? path.getValueFrom(object) : undefined;
-      this.value = valueFn ? valueFn(this.value_) : this.value_;
-      this.closed = true;
-      return;
-    }
-
-    Observer.call(this, object, callback, target, token);
-    this.valueFn = valueFn;
-    this.setValueFn = setValueFn;
-    this.path = path;
-
-    this.connect();
-    this.sync(true);
+    this.object_ = object;
+    this.path_ = path instanceof Path ? path : getPath(path);
+    this.directObserver_ = undefined;
   }
 
   PathObserver.prototype = createObject({
     __proto__: Observer.prototype,
 
-    connect: function() {
+    connect_: function() {
       if (hasObserve)
-        this.observedSet = new ObservedSet(this.boundInternalCallback);
+        this.directObserver_ = getObservedSet(this, this.object_);
+
+      this.check_(undefined, true);
     },
 
-    disconnect: function() {
-      this.value = undefined;
+    disconnect_: function() {
       this.value_ = undefined;
-      if (this.observedSet) {
-        this.observedSet.reset();
-        this.observedSet.cleanup();
-        this.observedSet = undefined;
+
+      if (this.directObserver_) {
+        this.directObserver_.close(this);
+        this.directObserver_ = undefined;
       }
     },
 
-    check: function() {
-      // Note: Extracting this to a member function for use here and below
-      // regresses dirty-checking path perf by about 25% =-(.
-      if (this.observedSet)
-        this.observedSet.reset();
+    iterateObjects_: function(observe) {
+      this.path_.iterateObjects(this.object_, observe);
+    },
 
-      this.value_ = this.path.getValueFrom(this.object, this.observedSet);
-
-      if (this.observedSet)
-        this.observedSet.cleanup();
-
-      if (areSameValue(this.value_, this.oldValue_))
+    check_: function(changeRecords, skipChanges) {
+      var oldValue = this.value_;
+      this.value_ = this.path_.getValueFrom(this.object_);
+      if (skipChanges || areSameValue(this.value_, oldValue))
         return false;
 
-      this.value = this.valueFn ? this.valueFn(this.value_) : this.value_;
-      this.reportArgs = [this.value, this.oldValue];
+      this.report_([this.value_, oldValue]);
       return true;
     },
 
-    sync: function(hard) {
-      if (hard) {
-        if (this.observedSet)
-          this.observedSet.reset();
-
-        this.value_ = this.path.getValueFrom(this.object, this.observedSet);
-        this.value = this.valueFn ? this.valueFn(this.value_) : this.value_;
-
-        if (this.observedSet)
-          this.observedSet.cleanup();
-      }
-
-      this.oldValue_ = this.value_;
-      this.oldValue = this.value;
-    },
-
     setValue: function(newValue) {
-      if (!this.path)
-        return;
-      if (typeof this.setValueFn === 'function')
-        newValue = this.setValueFn(newValue);
-      this.path.setValueFrom(this.object, newValue);
+      if (this.path_)
+        this.path_.setValueFrom(this.object_, newValue);
     }
   });
 
-  function CompoundPathObserver(callback, target, token, valueFn) {
-    Observer.call(this, undefined, callback, target, token);
-    this.valueFn = valueFn;
+  function CompoundObserver() {
+    Observer.call(this);
 
-    this.observed = [];
-    this.values = [];
-    this.value = undefined;
-    this.oldValue = undefined;
-    this.oldValues = undefined;
-    this.changeFlags = undefined;
-    this.started = false;
+    this.value_ = [];
+    this.directObserver_ = undefined;
+    this.observed_ = [];
   }
 
-  CompoundPathObserver.prototype = createObject({
-    __proto__: PathObserver.prototype,
+  var observerSentinel = {};
 
-    // TODO(rafaelw): Consider special-casing when |object| is a PathObserver
-    // and path 'value' to avoid explicit observation.
-    addPath: function(object, path) {
-      if (this.started)
-        throw Error('Cannot add more paths once started.');
+  CompoundObserver.prototype = createObject({
+    __proto__: Observer.prototype,
 
-      var path = path instanceof Path ? path : getPath(path);
-      var value = path ? path.getValueFrom(object) : undefined;
+    connect_: function() {
+      this.check_(undefined, true);
 
-      this.observed.push(object, path);
-      this.values.push(value);
-    },
+      if (!hasObserve)
+        return;
 
-    start: function() {
-      this.started = true;
-      this.connect();
-      this.sync(true);
-    },
-
-    getValues: function() {
-      if (this.observedSet)
-        this.observedSet.reset();
-
-      var anyChanged = false;
-      for (var i = 0; i < this.observed.length; i = i+2) {
-        var path = this.observed[i+1];
-        if (!path)
-          continue;
-        var object = this.observed[i];
-        var value = path.getValueFrom(object, this.observedSet);
-        var oldValue = this.values[i/2];
-        if (!areSameValue(value, oldValue)) {
-          if (!anyChanged && !this.valueFn) {
-            this.oldValues = this.oldValues || [];
-            this.changeFlags = this.changeFlags || [];
-            for (var j = 0; j < this.values.length; j++) {
-              this.oldValues[j] = this.values[j];
-              this.changeFlags[j] = false;
-            }
-          }
-
-          if (!this.valueFn)
-            this.changeFlags[i/2] = true;
-
-          this.values[i/2] = value;
-          anyChanged = true;
+      var object;
+      var needsDirectObserver = false;
+      for (var i = 0; i < this.observed_.length; i += 2) {
+        object = this.observed_[i]
+        if (object !== observerSentinel) {
+          needsDirectObserver = true;
+          break;
         }
       }
 
-      if (this.observedSet)
-        this.observedSet.cleanup();
-
-      return anyChanged;
-    },
-
-    check: function() {
-      if (!this.getValues())
+      if (this.directObserver_) {
+        if (needsDirectObserver) {
+          this.directObserver_.reset();
+          return;
+        }
+        this.directObserver_.close();
+        this.directObserver_ = undefined;
         return;
-
-      if (this.valueFn) {
-        this.value = this.valueFn(this.values);
-
-        if (areSameValue(this.value, this.oldValue))
-          return false;
-
-        this.reportArgs = [this.value, this.oldValue];
-      } else {
-        this.reportArgs = [this.values, this.oldValues, this.changeFlags,
-                           this.observed];
       }
 
-      return true;
+      if (needsDirectObserver)
+        this.directObserver_ = getObservedSet(this, object);
     },
 
-    sync: function(hard) {
-      if (hard) {
-        this.getValues();
-        if (this.valueFn)
-          this.value = this.valueFn(this.values);
+    closeObservers_: function() {
+      for (var i = 0; i < this.observed_.length; i += 2) {
+        if (this.observed_[i] === observerSentinel)
+          this.observed_[i + 1].close();
+      }
+      this.observed_.length = 0;
+    },
+
+    disconnect_: function() {
+      this.value_ = undefined;
+
+      if (this.directObserver_) {
+        this.directObserver_.close(this);
+        this.directObserver_ = undefined;
       }
 
-      if (this.valueFn)
-        this.oldValue = this.value;
+      this.closeObservers_();
+    },
+
+    addPath: function(object, path) {
+      if (this.state_ != UNOPENED && this.state_ != RESETTING)
+        throw Error('Cannot add paths once started.');
+
+      this.observed_.push(object, path instanceof Path ? path : getPath(path));
+    },
+
+    addObserver: function(observer) {
+      if (this.state_ != UNOPENED && this.state_ != RESETTING)
+        throw Error('Cannot add observers once started.');
+
+      observer.open(this.deliver, this);
+      this.observed_.push(observerSentinel, observer);
+    },
+
+    startReset: function() {
+      if (this.state_ != OPENED)
+        throw Error('Can only reset while open');
+
+      this.state_ = RESETTING;
+      this.closeObservers_();
+    },
+
+    finishReset: function() {
+      if (this.state_ != RESETTING)
+        throw Error('Can only finishReset after startReset');
+      this.state_ = OPENED;
+      this.connect_();
+
+      return this.value_;
+    },
+
+    iterateObjects_: function(observe) {
+      var object;
+      for (var i = 0; i < this.observed_.length; i += 2) {
+        object = this.observed_[i]
+        if (object !== observerSentinel)
+          this.observed_[i + 1].iterateObjects(object, observe)
+      }
+    },
+
+    check_: function(changeRecords, skipChanges) {
+      var oldValues;
+      for (var i = 0; i < this.observed_.length; i += 2) {
+        var pathOrObserver = this.observed_[i+1];
+        var object = this.observed_[i];
+        var value = object === observerSentinel ?
+            pathOrObserver.discardChanges() :
+            pathOrObserver.getValueFrom(object)
+
+        if (skipChanges) {
+          this.value_[i / 2] = value;
+          continue;
+        }
+
+        if (areSameValue(value, this.value_[i / 2]))
+          continue;
+
+        oldValues = oldValues || [];
+        oldValues[i / 2] = this.value_[i / 2];
+        this.value_[i / 2] = value;
+      }
+
+      if (!oldValues)
+        return false;
+
+      // TODO(rafaelw): Having observed_ as the third callback arg here is
+      // pretty lame API. Fix.
+      this.report_([this.value_, oldValues, this.observed_]);
+      return true;
+    }
+  });
+
+  function identFn(value) { return value; }
+
+  function ObserverTransform(observable, getValueFn, setValueFn,
+                             dontPassThroughSet) {
+    this.callback_ = undefined;
+    this.target_ = undefined;
+    this.value_ = undefined;
+    this.observable_ = observable;
+    this.getValueFn_ = getValueFn || identFn;
+    this.setValueFn_ = setValueFn || identFn;
+    // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this
+    // at the moment because of a bug in it's dependency tracking.
+    this.dontPassThroughSet_ = dontPassThroughSet;
+  }
+
+  ObserverTransform.prototype = {
+    open: function(callback, target) {
+      this.callback_ = callback;
+      this.target_ = target;
+      this.value_ =
+          this.getValueFn_(this.observable_.open(this.observedCallback_, this));
+      return this.value_;
+    },
+
+    observedCallback_: function(value) {
+      value = this.getValueFn_(value);
+      if (areSameValue(value, this.value_))
+        return;
+      var oldValue = this.value_;
+      this.value_ = value;
+      this.callback_.call(this.target_, this.value_, oldValue);
+    },
+
+    discardChanges: function() {
+      this.value_ = this.getValueFn_(this.observable_.discardChanges());
+      return this.value_;
+    },
+
+    deliver: function() {
+      return this.observable_.deliver();
+    },
+
+    setValue: function(value) {
+      value = this.setValueFn_(value);
+      if (!this.dontPassThroughSet_ && this.observable_.setValue)
+        return this.observable_.setValue(value);
     },
 
     close: function() {
-      if (this.observed) {
-        for (var i = 0; i < this.observed.length; i = i + 2) {
-          var object = this.observed[i];
-          if (object && typeof object.close === 'function')
-            object.close();
-        }
-        this.observed = undefined;
-        this.values = undefined;
-      }
-
-      Observer.prototype.close.call(this);
+      if (this.observable_)
+        this.observable_.close();
+      this.callback_ = undefined;
+      this.target_ = undefined;
+      this.observable_ = undefined;
+      this.value_ = undefined;
+      this.getValueFn_ = undefined;
+      this.setValueFn_ = undefined;
     }
-  });
+  }
 
   var expectedRecordTypes = {};
   expectedRecordTypes[PROP_ADD_TYPE] = true;
@@ -900,40 +1117,31 @@
     }
   }
 
-  // TODO(rafaelw): It should be possible for the Object.observe case to have
-  // every PathObserver used by defineProperty share a single Object.observe
-  // callback, and thus get() can simply call observer.deliver() and any changes
-  // to any dependent value will be observed.
-  PathObserver.defineProperty = function(target, name, object, path) {
-    // TODO(rafaelw): Validate errors
-    path = getPath(path);
+  Observer.defineComputedProperty = function(target, name, observable) {
     var notify = notifyFunction(target, name);
-
-    var observer = new PathObserver(object, path,
-        function(newValue, oldValue) {
-          if (notify)
-            notify(PROP_UPDATE_TYPE, oldValue);
-        }
-    );
+    var value = observable.open(function(newValue, oldValue) {
+      value = newValue;
+      if (notify)
+        notify(PROP_UPDATE_TYPE, oldValue);
+    });
 
     Object.defineProperty(target, name, {
       get: function() {
-        return path.getValueFrom(object);
+        observable.deliver();
+        return value;
       },
       set: function(newValue) {
-        path.setValueFrom(object, newValue);
+        observable.setValue(newValue);
+        return newValue;
       },
       configurable: true
     });
 
     return {
       close: function() {
-        var oldValue = path.getValueFrom(object);
-        if (notify)
-          observer.deliver();
-        observer.close();
+        observable.close();
         Object.defineProperty(target, name, {
-          value: oldValue,
+          value: value,
           writable: true,
           configurable: true
         });
@@ -1397,6 +1605,7 @@
   }
 
   global.Observer = Observer;
+  global.Observer.runEOM_ = runEOM;
   global.Observer.hasObjectObserve = hasObserve;
   global.ArrayObserver = ArrayObserver;
   global.ArrayObserver.calculateSplices = function(current, previous) {
@@ -1406,8 +1615,9 @@
   global.ArraySplice = ArraySplice;
   global.ObjectObserver = ObjectObserver;
   global.PathObserver = PathObserver;
-  global.CompoundPathObserver = CompoundPathObserver;
+  global.CompoundObserver = CompoundObserver;
   global.Path = Path;
+  global.ObserverTransform = ObserverTransform;
 
   // TODO(rafaelw): Only needed for testing until new change record names
   // make it to release.
@@ -1418,7 +1628,7 @@
     'delete': PROP_DELETE_TYPE,
     splice: ARRAY_SPLICE_TYPE
   };
-})(typeof global !== 'undefined' && global ? global : this || window);
+})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);
 
 /*
  * Copyright 2012 The Polymer Authors. All rights reserved.
@@ -1708,12 +1918,14 @@
   }
 
   var OriginalDOMImplementation = window.DOMImplementation;
+  var OriginalEventTarget = window.EventTarget;
   var OriginalEvent = window.Event;
   var OriginalNode = window.Node;
   var OriginalWindow = window.Window;
   var OriginalRange = window.Range;
   var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;
   var OriginalWebGLRenderingContext = window.WebGLRenderingContext;
+  var OriginalSVGElementInstance = window.SVGElementInstance;
 
   function isWrapper(object) {
     return object instanceof wrappers.EventTarget ||
@@ -1726,14 +1938,17 @@
   }
 
   function isNative(object) {
-    return object instanceof OriginalNode ||
+    return OriginalEventTarget && object instanceof OriginalEventTarget ||
+           object instanceof OriginalNode ||
            object instanceof OriginalEvent ||
            object instanceof OriginalWindow ||
            object instanceof OriginalRange ||
            object instanceof OriginalDOMImplementation ||
            object instanceof OriginalCanvasRenderingContext2D ||
            OriginalWebGLRenderingContext &&
-               object instanceof OriginalWebGLRenderingContext;
+               object instanceof OriginalWebGLRenderingContext ||
+           OriginalSVGElementInstance &&
+               object instanceof OriginalSVGElementInstance;
   }
 
   /**
@@ -1832,6 +2047,7 @@
   scope.defineGetter = defineGetter;
   scope.defineWrapGetter = defineWrapGetter;
   scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
+  scope.isWrapper = isWrapper;
   scope.isWrapperFor = isWrapperFor;
   scope.mixin = mixin;
   scope.nativePrototypeTable = nativePrototypeTable;
@@ -2287,6 +2503,7 @@
   var wrappedFuns = new WeakMap();
   var listenersTable = new WeakMap();
   var handledEventsTable = new WeakMap();
+  var currentlyDispatchingEvents = new WeakMap();
   var targetTable = new WeakMap();
   var currentTargetTable = new WeakMap();
   var relatedTargetTable = new WeakMap();
@@ -2458,16 +2675,16 @@
       return;
     handledEventsTable.set(originalEvent, true);
 
-    // Render before dispatching the event to ensure that the event path is
-    // correct.
-    scope.renderAllPending();
-
-    var target = wrap(originalEvent.target);
-    var event = wrap(originalEvent);
-    return dispatchEvent(event, target);
+    return dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));
   }
 
   function dispatchEvent(event, originalWrapperTarget) {
+    if (currentlyDispatchingEvents.get(event))
+      throw new Error('InvalidStateError')
+    currentlyDispatchingEvents.set(event, true);
+
+    // Render to ensure that the event path is correct.
+    scope.renderAllPending();
     var eventPath = retarget(originalWrapperTarget);
 
     // For window load events the load event is dispatched at the window but
@@ -2491,7 +2708,8 @@
     }
 
     eventPhaseTable.set(event, Event.NONE);
-    currentTargetTable.set(event, null);
+    currentTargetTable.delete(event, null);
+    currentlyDispatchingEvents.delete(event);
 
     return event.defaultPrevented;
   }
@@ -2630,7 +2848,12 @@
   };
 
   var OriginalEvent = window.Event;
-  OriginalEvent.prototype.polymerBlackList_ = {returnValue: true};
+  OriginalEvent.prototype.polymerBlackList_ = {
+    returnValue: true,
+    // TODO(arv): keyLocation is part of KeyboardEvent but Firefox does not
+    // support constructable KeyboardEvent so we keep it here for now.
+    keyLocation: true
+  };
 
   /**
    * Creates a new Event wrapper or wraps an existin native Event object.
@@ -2705,14 +2928,16 @@
     if (prototype)
       mixin(GenericEvent.prototype, prototype);
     if (OriginalEvent) {
-      // IE does not support event constructors but FocusEvent can only be
-      // created using new FocusEvent in Firefox.
-      // https://bugzilla.mozilla.org/show_bug.cgi?id=882165
-      if (OriginalEvent.prototype['init' + name]) {
+      // - Old versions of Safari fails on new FocusEvent (and others?).
+      // - IE does not support event constructors.
+      // - createEvent('FocusEvent') throws in Firefox.
+      // => Try the best practice solution first and fallback to the old way
+      // if needed.
+      try {
+        registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));
+      } catch (ex) {
         registerWrapper(OriginalEvent, GenericEvent,
                         document.createEvent(name));
-      } else {
-        registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));
       }
     }
     return GenericEvent;
@@ -2753,7 +2978,7 @@
 
   var supportsEventConstructors = (function() {
     try {
-      new window.MouseEvent('click');
+      new window.FocusEvent('focus');
     } catch (ex) {
       return false;
     }
@@ -2924,16 +3149,62 @@
       }
     },
     dispatchEvent: function(event) {
-      var target = getTargetToListenAt(this);
+      // We want to use the native dispatchEvent because it triggers the default
+      // actions (like checking a checkbox). However, if there are no listeners
+      // in the composed tree then there are no events that will trigger and
+      // listeners in the non composed tree that are part of the event path are
+      // not notified.
+      //
+      // If we find out that there are no listeners in the composed tree we add
+      // a temporary listener to the target which makes us get called back even
+      // in that case.
+
       var nativeEvent = unwrap(event);
+      var eventType = nativeEvent.type;
+
       // Allow dispatching the same event again. This is safe because if user
       // code calls this during an existing dispatch of the same event the
       // native dispatchEvent throws (that is required by the spec).
       handledEventsTable.set(nativeEvent, false);
-      return target.dispatchEvent_(nativeEvent);
+
+      // Force rendering since we prefer native dispatch and that works on the
+      // composed tree.
+      scope.renderAllPending();
+
+      var tempListener;
+      if (!hasListenerInAncestors(this, eventType)) {
+        tempListener = function() {};
+        this.addEventListener(eventType, tempListener, true);
+      }
+
+      try {
+        return unwrap(this).dispatchEvent_(nativeEvent);
+      } finally {
+        if (tempListener)
+          this.removeEventListener(eventType, tempListener, true);
+      }
     }
   };
 
+  function hasListener(node, type) {
+    var listeners = listenersTable.get(node);
+    if (listeners) {
+      for (var i = 0; i < listeners.length; i++) {
+        if (!listeners[i].removed && listeners[i].type === type)
+          return true;
+      }
+    }
+    return false;
+  }
+
+  function hasListenerInAncestors(target, type) {
+    for (var node = unwrap(target); node; node = node.parentNode) {
+      if (hasListener(wrap(node), type))
+        return true;
+    }
+    return false;
+  }
+
   if (OriginalEventTarget)
     registerWrapper(OriginalEventTarget, EventTarget);
 
@@ -3081,6 +3352,7 @@
   var assert = scope.assert;
   var defineWrapGetter = scope.defineWrapGetter;
   var enqueueMutation = scope.enqueueMutation;
+  var isWrapper = scope.isWrapper;
   var mixin = scope.mixin;
   var registerTransientObservers = scope.registerTransientObservers;
   var registerWrapper = scope.registerWrapper;
@@ -3254,6 +3526,18 @@
     return df;
   }
 
+  function clearChildNodes(wrapper) {
+    if (wrapper.firstChild_ !== undefined) {
+      var child = wrapper.firstChild_;
+      while (child) {
+        var tmp = child;
+        child = child.nextSibling_;
+        tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;
+      }
+    }
+    wrapper.firstChild_ = wrapper.lastChild_ = undefined;
+  }
+
   function removeAllChildNodes(wrapper) {
     if (wrapper.invalidateShadowRenderer()) {
       var childWrapper = wrapper.firstChild;
@@ -3286,6 +3570,13 @@
     return p && p.invalidateShadowRenderer();
   }
 
+  function cleanupNodes(nodes) {
+    for (var i = 0, n; i < nodes.length; i++) {
+      n = nodes[i];
+      n.parentNode.removeChild(n);
+    }
+  }
+
   var OriginalNode = window.Node;
 
   /**
@@ -3332,7 +3623,7 @@
      * @private
      */
     this.previousSibling_ = undefined;
-  };
+  }
 
   var OriginalDocumentFragment = window.DocumentFragment;
   var originalAppendChild = OriginalNode.prototype.appendChild;
@@ -3366,8 +3657,19 @@
     insertBefore: function(childWrapper, refWrapper) {
       assertIsNodeWrapper(childWrapper);
 
-      refWrapper = refWrapper || null;
-      refWrapper && assertIsNodeWrapper(refWrapper);
+      var refNode;
+      if (refWrapper) {
+        if (isWrapper(refWrapper)) {
+          refNode = unwrap(refWrapper);
+        } else {
+          refNode = refWrapper;
+          refWrapper = wrap(refNode);
+        }
+      } else {
+        refWrapper = null;
+        refNode = null;
+      }
+
       refWrapper && assert(refWrapper.parentNode === this);
 
       var nodes;
@@ -3384,15 +3686,14 @@
 
       if (useNative) {
         ensureSameOwnerDocument(this, childWrapper);
-        originalInsertBefore.call(this.impl, unwrap(childWrapper),
-                                  unwrap(refWrapper));
+        clearChildNodes(this);
+        originalInsertBefore.call(this.impl, unwrap(childWrapper), refNode);
       } else {
         if (!previousNode)
           this.firstChild_ = nodes[0];
         if (!refWrapper)
           this.lastChild_ = nodes[nodes.length - 1];
 
-        var refNode = unwrap(refWrapper);
         var parentNode = refNode ? refNode.parentNode : this.impl;
 
         // insertBefore refWrapper no matter what the parent is?
@@ -3463,6 +3764,7 @@
         childWrapper.previousSibling_ = childWrapper.nextSibling_ =
             childWrapper.parentNode_ = undefined;
       } else {
+        clearChildNodes(this);
         removeChildOriginalHelper(this.impl, childNode);
       }
 
@@ -3481,14 +3783,20 @@
 
     replaceChild: function(newChildWrapper, oldChildWrapper) {
       assertIsNodeWrapper(newChildWrapper);
-      assertIsNodeWrapper(oldChildWrapper);
+
+      var oldChildNode;
+      if (isWrapper(oldChildWrapper)) {
+        oldChildNode = unwrap(oldChildWrapper);
+      } else {
+        oldChildNode = oldChildWrapper;
+        oldChildWrapper = wrap(oldChildNode);
+      }
 
       if (oldChildWrapper.parentNode !== this) {
         // TODO(arv): DOMException
         throw new Error('NotFoundError');
       }
 
-      var oldChildNode = unwrap(oldChildWrapper);
       var nextNode = oldChildWrapper.nextSibling;
       var previousNode = oldChildWrapper.previousSibling;
       var nodes;
@@ -3522,6 +3830,7 @@
         }
       } else {
         ensureSameOwnerDocument(this, newChildWrapper);
+        clearChildNodes(this);
         originalReplaceChild.call(this.impl, unwrap(newChildWrapper),
                                   oldChildNode);
       }
@@ -3598,7 +3907,9 @@
       // are no shadow trees below or above the context node.
       var s = '';
       for (var child = this.firstChild; child; child = child.nextSibling) {
-        s += child.textContent;
+        if (child.nodeType != Node.COMMENT_NODE) {
+          s += child.textContent;
+        }
       }
       return s;
     },
@@ -3612,6 +3923,7 @@
           this.appendChild(textNode);
         }
       } else {
+        clearChildNodes(this);
         this.impl.textContent = textContent;
       }
 
@@ -3666,6 +3978,43 @@
       // This only wraps, it therefore only operates on the composed DOM and not
       // the logical DOM.
       return originalCompareDocumentPosition.call(this.impl, unwrap(otherNode));
+    },
+
+    normalize: function() {
+      var nodes = snapshotNodeList(this.childNodes);
+      var remNodes = [];
+      var s = '';
+      var modNode;
+
+      for (var i = 0, n; i < nodes.length; i++) {
+        n = nodes[i];
+        if (n.nodeType === Node.TEXT_NODE) {
+          if (!modNode && !n.data.length)
+            this.removeNode(n);
+          else if (!modNode)
+            modNode = n;
+          else {
+            s += n.data;
+            remNodes.push(n);
+          }
+        } else {
+          if (modNode && remNodes.length) {
+            modNode.data += s;
+            cleanUpNodes(remNodes);
+          }
+          remNodes = [];
+          s = '';
+          modNode = null;
+          if (n.childNodes.length)
+            n.normalize();
+        }
+      }
+
+      // handle case where >1 text nodes are the last children
+      if (modNode && remNodes.length) {
+        modNode.data += s;
+        cleanupNodes(remNodes);
+      }
     }
   });
 
@@ -3878,6 +4227,49 @@
   scope.wrappers.CharacterData = CharacterData;
 })(window.ShadowDOMPolyfill);
 
+// Copyright 2014 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var CharacterData = scope.wrappers.CharacterData;
+  var enqueueMutation = scope.enqueueMutation;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+
+  function toUInt32(x) {
+    return x >>> 0;
+  }
+
+  var OriginalText = window.Text;
+
+  function Text(node) {
+    CharacterData.call(this, node);
+  }
+  Text.prototype = Object.create(CharacterData.prototype);
+  mixin(Text.prototype, {
+    splitText: function(offset) {
+      offset = toUInt32(offset);
+      var s = this.data;
+      if (offset > s.length)
+        throw new Error('IndexSizeError');
+      var head = s.slice(0, offset);
+      var tail = s.slice(offset);
+      this.data = head;
+      var newTextNode = this.ownerDocument.createTextNode(tail);
+      if (this.parentNode)
+        this.parentNode.insertBefore(newTextNode, this.nextSibling);
+      return newTextNode;
+    }
+  });
+
+  registerWrapper(OriginalText, Text, document.createTextNode(''));
+
+  scope.wrappers.Text = Text;
+})(window.ShadowDOMPolyfill);
+
 // Copyright 2013 The Polymer Authors. All rights reserved.
 // Use of this source code is goverened by a BSD-style
 // license that can be found in the LICENSE file.
@@ -3899,12 +4291,16 @@
 
   var OriginalElement = window.Element;
 
-  var matchesName = oneOf(OriginalElement.prototype, [
-    'matches',
+  var matchesNames = [
+    'matches',  // needs to come first.
     'mozMatchesSelector',
     'msMatchesSelector',
     'webkitMatchesSelector',
-  ]);
+  ].filter(function(name) {
+    return OriginalElement.prototype[name];
+  });
+
+  var matchesName = matchesNames[0];
 
   var originalMatches = OriginalElement.prototype[matchesName];
 
@@ -3968,9 +4364,13 @@
     }
   });
 
-  Element.prototype[matchesName] = function(selector) {
-    return this.matches(selector);
-  };
+  matchesNames.forEach(function(name) {
+    if (name !== 'matches') {
+      Element.prototype[name] = function(selector) {
+        return this.matches(selector);
+      };
+    }
+  });
 
   if (OriginalElement.prototype.webkitCreateShadowRoot) {
     Element.prototype.webkitCreateShadowRoot =
@@ -4004,11 +4404,12 @@
   mixin(Element.prototype, ParentNodeInterface);
   mixin(Element.prototype, SelectorsInterface);
 
-  registerWrapper(OriginalElement, Element);
+  registerWrapper(OriginalElement, Element,
+                  document.createElementNS(null, 'x'));
 
   // TODO(arv): Export setterDirtiesAttribute and apply it to more bindings
   // that reflect attributes.
-  scope.matchesName = matchesName;
+  scope.matchesNames = matchesNames;
   scope.wrappers.Element = Element;
 })(window.ShadowDOMPolyfill);
 
@@ -4033,7 +4434,9 @@
   /////////////////////////////////////////////////////////////////////////////
   // innerHTML and outerHTML
 
-  var escapeRegExp = /&|<|"/g;
+  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString
+  var escapeAttrRegExp = /[&\u00A0"]/g;
+  var escapeDataRegExp = /[&\u00A0<>]/g;
 
   function escapeReplace(c) {
     switch (c) {
@@ -4041,43 +4444,70 @@
         return '&amp;';
       case '<':
         return '&lt;';
+      case '>':
+        return '&gt;';
       case '"':
         return '&quot;'
+      case '\u00A0':
+        return '&nbsp;';
     }
   }
 
-  function escape(s) {
-    return s.replace(escapeRegExp, escapeReplace);
+  function escapeAttr(s) {
+    return s.replace(escapeAttrRegExp, escapeReplace);
+  }
+
+  function escapeData(s) {
+    return s.replace(escapeDataRegExp, escapeReplace);
+  }
+
+  function makeSet(arr) {
+    var set = {};
+    for (var i = 0; i < arr.length; i++) {
+      set[arr[i]] = true;
+    }
+    return set;
   }
 
   // http://www.whatwg.org/specs/web-apps/current-work/#void-elements
-  var voidElements = {
-    'area': true,
-    'base': true,
-    'br': true,
-    'col': true,
-    'command': true,
-    'embed': true,
-    'hr': true,
-    'img': true,
-    'input': true,
-    'keygen': true,
-    'link': true,
-    'meta': true,
-    'param': true,
-    'source': true,
-    'track': true,
-    'wbr': true
-  };
+  var voidElements = makeSet([
+    'area',
+    'base',
+    'br',
+    'col',
+    'command',
+    'embed',
+    'hr',
+    'img',
+    'input',
+    'keygen',
+    'link',
+    'meta',
+    'param',
+    'source',
+    'track',
+    'wbr'
+  ]);
 
-  function getOuterHTML(node) {
+  var plaintextParents = makeSet([
+    'style',
+    'script',
+    'xmp',
+    'iframe',
+    'noembed',
+    'noframes',
+    'plaintext',
+    'noscript'
+  ]);
+
+  function getOuterHTML(node, parentNode) {
     switch (node.nodeType) {
       case Node.ELEMENT_NODE:
         var tagName = node.tagName.toLowerCase();
         var s = '<' + tagName;
         var attrs = node.attributes;
         for (var i = 0, attr; attr = attrs[i]; i++) {
-          s += ' ' + attr.name + '="' + escape(attr.value) + '"';
+          s += ' ' + attr.name + '="' + escapeAttr(attr.value) + '"';
         }
         s += '>';
         if (voidElements[tagName])
@@ -4086,10 +4516,14 @@
         return s + getInnerHTML(node) + '</' + tagName + '>';
 
       case Node.TEXT_NODE:
-        return escape(node.nodeValue);
+        var data = node.data;
+        if (parentNode && plaintextParents[parentNode.localName])
+          return data;
+        return escapeData(data);
 
       case Node.COMMENT_NODE:
-        return '<!--' + escape(node.nodeValue) + '-->';
+        return '<!--' + node.data + '-->';
+
       default:
         console.error(node);
         throw new Error('not implemented');
@@ -4099,7 +4533,7 @@
   function getInnerHTML(node) {
     var s = '';
     for (var child = node.firstChild; child; child = child.nextSibling) {
-      s += getOuterHTML(child);
+      s += getOuterHTML(child, node);
     }
     return s;
   }
@@ -4115,6 +4549,9 @@
     }
   }
 
+  // IE11 does not have MSIE in the user agent string.
+  var oldIe = /MSIE/.test(navigator.userAgent);
+
   var OriginalHTMLElement = window.HTMLElement;
 
   function HTMLElement(node) {
@@ -4128,6 +4565,17 @@
       return getInnerHTML(this);
     },
     set innerHTML(value) {
+      // IE9 does not handle set innerHTML correctly on plaintextParents. It
+      // creates element children. For example
+      //
+      //   scriptElement.innerHTML = '<a>test</a>'
+      //
+      // Creates a single HTMLAnchorElement child.
+      if (oldIe && plaintextParents[this.localName]) {
+        this.textContent = value;
+        return;
+      }
+
       var removedNodes = snapshotNodeList(this.childNodes);
 
       if (this.invalidateShadowRenderer())
@@ -4146,19 +4594,57 @@
     },
 
     get outerHTML() {
-      // TODO(arv): This should fallback to HTMLElement_prototype.outerHTML if there
-      // are no shadow trees below or above the context node.
-      return getOuterHTML(this);
+      return getOuterHTML(this, this.parentNode);
     },
     set outerHTML(value) {
       var p = this.parentNode;
       if (p) {
         p.invalidateShadowRenderer();
-        this.impl.outerHTML = value;
+        var df = frag(p, value);
+        p.replaceChild(df, this);
       }
+    },
+
+    insertAdjacentHTML: function(position, text) {
+      var contextElement, refNode;
+      switch (String(position).toLowerCase()) {
+        case 'beforebegin':
+          contextElement = this.parentNode;
+          refNode = this;
+          break;
+        case 'afterend':
+          contextElement = this.parentNode;
+          refNode = this.nextSibling;
+          break;
+        case 'afterbegin':
+          contextElement = this;
+          refNode = this.firstChild;
+          break;
+        case 'beforeend':
+          contextElement = this;
+          refNode = null;
+          break;
+        default:
+          return;
+      }
+
+      var df = frag(contextElement, text);
+      contextElement.insertBefore(df, refNode);
     }
   });
 
+  function frag(contextElement, html) {
+    // TODO(arv): This does not work with SVG and other non HTML elements.
+    var p = unwrap(contextElement.cloneNode(false));
+    p.innerHTML = html;
+    var df = unwrap(document.createDocumentFragment());
+    var c;
+    while (c = p.firstChild) {
+      df.appendChild(c);
+    }
+    return wrap(df);
+  }
+
   function getter(name) {
     return function() {
       scope.renderAllPending();
@@ -4616,6 +5102,138 @@
   scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;
 })(window.ShadowDOMPolyfill);
 
+// Copyright 2014 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var registerObject = scope.registerObject;
+
+  var SVG_NS = 'http://www.w3.org/2000/svg';
+  var svgTitleElement = document.createElementNS(SVG_NS, 'title');
+  var SVGTitleElement = registerObject(svgTitleElement);
+  var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
+
+  scope.wrappers.SVGElement = SVGElement;
+})(window.ShadowDOMPolyfill);
+
+// Copyright 2014 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+
+  var OriginalSVGUseElement = window.SVGUseElement;
+
+  // IE uses SVGElement as parent interface, SVG2 (Blink & Gecko) uses
+  // SVGGraphicsElement. Use the <g> element to get the right prototype.
+
+  var SVG_NS = 'http://www.w3.org/2000/svg';
+  var gWrapper = wrap(document.createElementNS(SVG_NS, 'g'));
+  var useElement = document.createElementNS(SVG_NS, 'use');
+  var SVGGElement = gWrapper.constructor;
+  var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);
+  var parentInterface = parentInterfacePrototype.constructor;
+
+  function SVGUseElement(impl) {
+    parentInterface.call(this, impl);
+  }
+
+  SVGUseElement.prototype = Object.create(parentInterfacePrototype);
+
+  // Firefox does not expose instanceRoot.
+  if ('instanceRoot' in useElement) {
+    mixin(SVGUseElement.prototype, {
+      get instanceRoot() {
+        return wrap(unwrap(this).instanceRoot);
+      },
+      get animatedInstanceRoot() {
+        return wrap(unwrap(this).animatedInstanceRoot);
+      },
+    });
+  }
+
+  registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);
+
+  scope.wrappers.SVGUseElement = SVGUseElement;
+})(window.ShadowDOMPolyfill);
+
+// Copyright 2014 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var EventTarget = scope.wrappers.EventTarget;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var wrap = scope.wrap;
+
+  var OriginalSVGElementInstance = window.SVGElementInstance;
+  if (!OriginalSVGElementInstance)
+    return;
+
+  function SVGElementInstance(impl) {
+    EventTarget.call(this, impl);
+  }
+
+  SVGElementInstance.prototype = Object.create(EventTarget.prototype);
+  mixin(SVGElementInstance.prototype, {
+    /** @type {SVGElement} */
+    get correspondingElement() {
+      return wrap(this.impl.correspondingElement);
+    },
+
+    /** @type {SVGUseElement} */
+    get correspondingUseElement() {
+      return wrap(this.impl.correspondingUseElement);
+    },
+
+    /** @type {SVGElementInstance} */
+    get parentNode() {
+      return wrap(this.impl.parentNode);
+    },
+
+    /** @type {SVGElementInstanceList} */
+    get childNodes() {
+      throw new Error('Not implemented');
+    },
+
+    /** @type {SVGElementInstance} */
+    get firstChild() {
+      return wrap(this.impl.firstChild);
+    },
+
+    /** @type {SVGElementInstance} */
+    get lastChild() {
+      return wrap(this.impl.lastChild);
+    },
+
+    /** @type {SVGElementInstance} */
+    get previousSibling() {
+      return wrap(this.impl.previousSibling);
+    },
+
+    /** @type {SVGElementInstance} */
+    get nextSibling() {
+      return wrap(this.impl.nextSibling);
+    }
+  });
+
+  registerWrapper(OriginalSVGElementInstance, SVGElementInstance);
+
+  scope.wrappers.SVGElementInstance = SVGElementInstance;
+})(window.ShadowDOMPolyfill);
+
 // Copyright 2013 The Polymer Authors. All rights reserved.
 // Use of this source code is goverened by a BSD-style
 // license that can be found in the LICENSE file.
@@ -4785,6 +5403,9 @@
     },
     intersectsNode: function(node) {
       return this.impl.intersectsNode(unwrapIfNeeded(node));
+    },
+    toString: function() {
+      return this.impl.toString();
     }
   };
 
@@ -4819,12 +5440,10 @@
   mixin(DocumentFragment.prototype, SelectorsInterface);
   mixin(DocumentFragment.prototype, GetElementsByInterface);
 
-  var Text = registerObject(document.createTextNode(''));
   var Comment = registerObject(document.createComment(''));
 
   scope.wrappers.Comment = Comment;
   scope.wrappers.DocumentFragment = DocumentFragment;
-  scope.wrappers.Text = Text;
 
 })(window.ShadowDOMPolyfill);
 
@@ -4846,6 +5465,8 @@
   var shadowHostTable = new WeakMap();
   var nextOlderShadowTreeTable = new WeakMap();
 
+  var spaceCharRe = /[ \t\n\r\f]/;
+
   function ShadowRoot(hostWrapper) {
     var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());
     DocumentFragment.call(this, node);
@@ -4886,7 +5507,9 @@
     },
 
     getElementById: function(id) {
-      return this.querySelector('#' + id);
+      if (spaceCharRe.test(id))
+        return null;
+      return this.querySelector('[id="' + id + '"]');
     }
   });
 
@@ -5086,10 +5709,18 @@
     if (!(node instanceof Element))
       return false;
 
+    // The native matches function in IE9 does not correctly work with elements
+    // that are not in the document.
+    // TODO(arv): Implement matching in JS.
+    // https://github.com/Polymer/ShadowDOM/issues/361
+    if (select === '*' || select === node.localName)
+      return true;
+
     // TODO(arv): This does not seem right. Need to check for a simple selector.
     if (!selectorMatchRegExp.test(select))
       return false;
 
+    // TODO(arv): This no longer matches the spec.
     if (select[0] === ':' && !allowedPseudoRegExp.test(select))
       return false;
 
@@ -5606,6 +6237,74 @@
 
 })(window.ShadowDOMPolyfill);
 
+// Copyright 2014 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+
+  var OriginalSelection = window.Selection;
+
+  function Selection(impl) {
+    this.impl = impl;
+  }
+  Selection.prototype = {
+    get anchorNode() {
+      return wrap(this.impl.anchorNode);
+    },
+    get focusNode() {
+      return wrap(this.impl.focusNode);
+    },
+    addRange: function(range) {
+      this.impl.addRange(unwrap(range));
+    },
+    collapse: function(node, index) {
+      this.impl.collapse(unwrapIfNeeded(node), index);
+    },
+    containsNode: function(node, allowPartial) {
+      return this.impl.containsNode(unwrapIfNeeded(node), allowPartial);
+    },
+    extend: function(node, offset) {
+      this.impl.extend(unwrapIfNeeded(node), offset);
+    },
+    getRangeAt: function(index) {
+      return wrap(this.impl.getRangeAt(index));
+    },
+    removeRange: function(range) {
+      this.impl.removeRange(unwrap(range));
+    },
+    selectAllChildren: function(node) {
+      this.impl.selectAllChildren(unwrapIfNeeded(node));
+    },
+    toString: function() {
+      return this.impl.toString();
+    }
+  };
+
+  // WebKit extensions. Not implemented.
+  // readonly attribute Node baseNode;
+  // readonly attribute long baseOffset;
+  // readonly attribute Node extentNode;
+  // readonly attribute long extentOffset;
+  // [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode,
+  //                       [Default=Undefined] optional long baseOffset,
+  //                       [Default=Undefined] optional Node extentNode,
+  //                       [Default=Undefined] optional long extentOffset);
+  // [RaisesException, ImplementedAs=collapse] void setPosition([Default=Undefined] optional Node node,
+  //                  [Default=Undefined] optional long offset);
+
+  registerWrapper(window.Selection, Selection, window.getSelection());
+
+  scope.wrappers.Selection = Selection;
+
+})(window.ShadowDOMPolyfill);
+
 // Copyright 2013 The Polymer Authors. All rights reserved.
 // Use of this source code is goverened by a BSD-style
 // license that can be found in the LICENSE file.
@@ -5616,14 +6315,17 @@
   var GetElementsByInterface = scope.GetElementsByInterface;
   var Node = scope.wrappers.Node;
   var ParentNodeInterface = scope.ParentNodeInterface;
+  var Selection = scope.wrappers.Selection;
   var SelectorsInterface = scope.SelectorsInterface;
   var ShadowRoot = scope.wrappers.ShadowRoot;
   var defineWrapGetter = scope.defineWrapGetter;
   var elementFromPoint = scope.elementFromPoint;
   var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
-  var matchesName = scope.matchesName;
+  var matchesNames = scope.matchesNames;
   var mixin = scope.mixin;
   var registerWrapper = scope.registerWrapper;
+  var renderAllPending = scope.renderAllPending;
+  var rewrap = scope.rewrap;
   var unwrap = scope.unwrap;
   var wrap = scope.wrap;
   var wrapEventTargetMethods = scope.wrapEventTargetMethods;
@@ -5662,7 +6364,7 @@
     'createEventNS',
     'createRange',
     'createTextNode',
-    'getElementById',
+    'getElementById'
   ].forEach(wrapMethod);
 
   var originalAdoptNode = document.adoptNode;
@@ -5689,6 +6391,7 @@
   }
 
   var originalImportNode = document.importNode;
+  var originalGetSelection = document.getSelection;
 
   mixin(Document.prototype, {
     adoptNode: function(node) {
@@ -5710,12 +6413,16 @@
         }
       }
       return clone;
+    },
+    getSelection: function() {
+      renderAllPending();
+      return new Selection(originalGetSelection.call(unwrap(this)));
     }
   });
 
-  if (document.register) {
-    var originalRegister = document.register;
-    Document.prototype.register = function(tagName, object) {
+  if (document.registerElement) {
+    var originalRegisterElement = document.registerElement;
+    Document.prototype.registerElement = function(tagName, object) {
       var prototype = object.prototype;
 
       // If we already used the object as a prototype for another custom
@@ -5759,14 +6466,19 @@
       // and not from the spec since the spec is out of date.
       [
         'createdCallback',
-        'enteredViewCallback',
-        'leftViewCallback',
+        'attachedCallback',
+        'detachedCallback',
         'attributeChangedCallback',
       ].forEach(function(name) {
         var f = prototype[name];
         if (!f)
           return;
         newPrototype[name] = function() {
+          // if this element has been wrapped prior to registration,
+          // the wrapper is stale; in this case rewrap
+          if (!(wrap(this) instanceof CustomElementConstructor)) {
+            rewrap(this);
+          }
           f.apply(wrap(this), arguments);
         };
       });
@@ -5774,9 +6486,8 @@
       var p = {prototype: newPrototype};
       if (object.extends)
         p.extends = object.extends;
-      var nativeConstructor = originalRegister.call(unwrap(this), tagName, p);
 
-      function GeneratedWrapper(node) {
+      function CustomElementConstructor(node) {
         if (!node) {
           if (object.extends) {
             return document.createElement(object.extends, tagName);
@@ -5786,19 +6497,22 @@
         }
         this.impl = node;
       }
-      GeneratedWrapper.prototype = prototype;
-      GeneratedWrapper.prototype.constructor = GeneratedWrapper;
+      CustomElementConstructor.prototype = prototype;
+      CustomElementConstructor.prototype.constructor = CustomElementConstructor;
 
-      scope.constructorTable.set(newPrototype, GeneratedWrapper);
+      scope.constructorTable.set(newPrototype, CustomElementConstructor);
       scope.nativePrototypeTable.set(prototype, newPrototype);
 
-      return GeneratedWrapper;
+      // registration is synchronous so do it last
+      var nativeConstructor = originalRegisterElement.call(unwrap(this),
+          tagName, p);
+      return CustomElementConstructor;
     };
 
     forwardMethodsToWrapper([
       window.HTMLDocument || window.Document,  // Gecko adds these to HTMLDocument
     ], [
-      'register',
+      'registerElement',
     ]);
   }
 
@@ -5821,8 +6535,7 @@
     'querySelectorAll',
     'removeChild',
     'replaceChild',
-    matchesName,
-  ]);
+  ].concat(matchesNames));
 
   forwardMethodsToWrapper([
     window.HTMLDocument || window.Document,  // Gecko adds these to HTMLDocument
@@ -5840,6 +6553,7 @@
     'createTextNode',
     'elementFromPoint',
     'getElementById',
+    'getSelection',
   ]);
 
   mixin(Document.prototype, GetElementsByInterface);
@@ -5920,40 +6634,56 @@
   'use strict';
 
   var EventTarget = scope.wrappers.EventTarget;
+  var Selection = scope.wrappers.Selection;
   var mixin = scope.mixin;
   var registerWrapper = scope.registerWrapper;
+  var renderAllPending = scope.renderAllPending;
   var unwrap = scope.unwrap;
   var unwrapIfNeeded = scope.unwrapIfNeeded;
   var wrap = scope.wrap;
-  var renderAllPending = scope.renderAllPending;
 
   var OriginalWindow = window.Window;
+  var originalGetComputedStyle = window.getComputedStyle;
+  var originalGetSelection = window.getSelection;
 
   function Window(impl) {
     EventTarget.call(this, impl);
   }
   Window.prototype = Object.create(EventTarget.prototype);
 
-  var originalGetComputedStyle = window.getComputedStyle;
   OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {
-    renderAllPending();
-    return originalGetComputedStyle.call(this || window, unwrapIfNeeded(el),
-                                         pseudo);
+    return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);
   };
 
+  OriginalWindow.prototype.getSelection = function() {
+    return wrap(this || window).getSelection();
+  };
+
+  // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065
+  delete window.getComputedStyle;
+  delete window.getSelection;
+
   ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(
       function(name) {
         OriginalWindow.prototype[name] = function() {
           var w = wrap(this || window);
           return w[name].apply(w, arguments);
         };
+
+        // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065
+        delete window[name];
       });
 
   mixin(Window.prototype, {
     getComputedStyle: function(el, pseudo) {
+      renderAllPending();
       return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),
                                            pseudo);
-    }
+    },
+    getSelection: function() {
+      renderAllPending();
+      return new Selection(originalGetSelection.call(unwrap(this)));
+    },
   });
 
   registerWrapper(OriginalWindow, Window);
@@ -5975,7 +6705,12 @@
   // for.
   var elements = {
     'a': 'HTMLAnchorElement',
-    'applet': 'HTMLAppletElement',
+
+    // Do not create an applet element by default since it shows a warning in
+    // IE.
+    // https://github.com/Polymer/polymer/issues/217
+    // 'applet': 'HTMLAppletElement',
+
     'area': 'HTMLAreaElement',
     'br': 'HTMLBRElement',
     'base': 'HTMLBaseElement',
@@ -6083,6 +6818,10 @@
     }
   });
 
+  // ShadowCSS needs this:
+  window.wrap = window.ShadowDOMPolyfill.wrap;
+  window.unwrap = window.ShadowDOMPolyfill.unwrap;
+
   //TODO(sjmiles): review method alias with Arv
   HTMLElement.prototype.webkitCreateShadowRoot =
       HTMLElement.prototype.createShadowRoot;
@@ -6290,6 +7029,8 @@
 */
 (function(scope) {
 
+var loader = scope.loader;
+
 var ShadowCSS = {
   strictStyling: false,
   registry: {},
@@ -6307,14 +7048,8 @@
     if (this.strictStyling) {
       this.applyScopeToContent(root, name);
     }
-    // insert @polyfill and @polyfill-rule rules into style elements
-    // scoping process takes care of shimming these
-    this.insertPolyfillDirectives(def.rootStyles);
-    this.insertPolyfillRules(def.rootStyles);
-    var cssText = this.stylesToShimmedCssText(def.scopeStyles, name,
-        typeExtension);
-    // note: we only need to do rootStyles since these are unscoped.
-    cssText += this.extractPolyfillUnscopedRules(def.rootStyles);
+    var cssText = this.stylesToShimmedCssText(def.rootStyles, def.scopeStyles,
+        name, typeExtension);
     // provide shimmedStyle for user extensibility
     def.shimmedStyle = cssTextToStyle(cssText);
     if (root) {
@@ -6328,6 +7063,20 @@
     // add style to document
     addCssToDocument(cssText);
   },
+  // apply @polyfill rules + @host and scope shimming
+  stylesToShimmedCssText: function(rootStyles, scopeStyles, name,
+      typeExtension) {
+    name = name || '';
+    // insert @polyfill and @polyfill-rule rules into style elements
+    // scoping process takes care of shimming these
+    this.insertPolyfillDirectives(rootStyles);
+    this.insertPolyfillRules(rootStyles);
+    var cssText = this.shimAtHost(scopeStyles, name, typeExtension) +
+        this.shimScoping(scopeStyles, name, typeExtension);
+    // note: we only need to do rootStyles since these are unscoped.
+    cssText += this.extractPolyfillUnscopedRules(rootStyles);
+    return cssText;
+  },
   registerDefinition: function(root, name, extendsName) {
     var def = this.registry[name] = {
       root: root,
@@ -6446,11 +7195,6 @@
     }
     return r;
   },
-  // apply @host and scope shimming
-  stylesToShimmedCssText: function(styles, name, typeExtension) {
-    return this.shimAtHost(styles, name, typeExtension) +
-        this.shimScoping(styles, name, typeExtension);
-  },
   // form: @host { .foo { declarations } }
   // becomes: scopeName.foo { declarations }
   shimAtHost: function(styles, name, typeExtension) {
@@ -6519,11 +7263,16 @@
     var cssText = stylesToCssText(styles).replace(hostRuleRe, '');
     cssText = this.insertPolyfillHostInCssText(cssText);
     cssText = this.convertColonHost(cssText);
+    cssText = this.convertColonAncestor(cssText);
+    // TODO(sorvell): deprecated, remove
     cssText = this.convertPseudos(cssText);
+    // TODO(sorvell): deprecated, remove
     cssText = this.convertParts(cssText);
     cssText = this.convertCombinators(cssText);
     var rules = cssToRules(cssText);
-    cssText = this.scopeRules(rules, name, typeExtension);
+    if (name) {
+      cssText = this.scopeRules(rules, name, typeExtension);
+    }
     return cssText;
   },
   convertPseudos: function(cssText) {
@@ -6537,29 +7286,40 @@
    *
    * to
    *
+   * scopeName.foo > .bar
+  */
+  convertColonHost: function(cssText) {
+    return this.convertColonRule(cssText, cssColonHostRe,
+        this.colonHostPartReplacer);
+  },
+  /*
+   * convert a rule like :ancestor(.foo) > .bar { }
+   *
+   * to
+   *
    * scopeName.foo > .bar, .foo scopeName > .bar { }
    * 
    * and
    *
-   * :host(.foo:host) .bar { ... }
+   * :ancestor(.foo:host) .bar { ... }
    * 
    * to
    * 
    * scopeName.foo .bar { ... }
   */
-  convertColonHost: function(cssText) {
+  convertColonAncestor: function(cssText) {
+    return this.convertColonRule(cssText, cssColonAncestorRe,
+        this.colonAncestorPartReplacer);
+  },
+  convertColonRule: function(cssText, regExp, partReplacer) {
     // p1 = :host, p2 = contents of (), p3 rest of rule
-    return cssText.replace(cssColonHostRe, function(m, p1, p2, p3) {
+    return cssText.replace(regExp, function(m, p1, p2, p3) {
       p1 = polyfillHostNoCombinator;
       if (p2) {
         var parts = p2.split(','), r = [];
         for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {
           p = p.trim();
-          if (p.match(polyfillHost)) {
-            r.push(p1 + p.replace(polyfillHost, '') + p3);
-          } else {
-            r.push(p1 + p + p3 + ', ' + p + ' ' + p1 + p3);
-          }
+          r.push(partReplacer(p1, p, p3));
         }
         return r.join(',');
       } else {
@@ -6567,6 +7327,16 @@
       }
     });
   },
+  colonAncestorPartReplacer: function(host, part, suffix) {
+    if (part.match(polyfillHost)) {
+      return this.colonHostPartReplacer(host, part, suffix);
+    } else {
+      return host + part + suffix + ', ' + part + ' ' + host + suffix;
+    }
+  },
+  colonHostPartReplacer: function(host, part, suffix) {
+    return host + part.replace(polyfillHost, '') + suffix;
+  },
   /*
    * Convert ^ and ^^ combinators by replacing with space.
   */
@@ -6643,9 +7413,15 @@
   },
   insertPolyfillHostInCssText: function(selector) {
     return selector.replace(hostRe, polyfillHost).replace(colonHostRe,
-        polyfillHost);
+        polyfillHost).replace(colonAncestorRe, polyfillAncestor);
   },
   propertiesFromRule: function(rule) {
+    // TODO(sorvell): Safari cssom incorrectly removes quotes from the content
+    // property. (https://bugs.webkit.org/show_bug.cgi?id=118045)
+    if (rule.style.content && !rule.style.content.match(/['"]+/)) {
+      return rule.style.cssText.replace(/content:[^;]*;/g, 'content: \'' + 
+          rule.style.content + '\';');
+    }
     return rule.style.cssText;
   }
 };
@@ -6662,16 +7438,21 @@
     cssPartRe = /::part\(([^)]*)\)/gim,
     // note: :host pre-processed to -shadowcsshost.
     polyfillHost = '-shadowcsshost',
-    cssColonHostRe = new RegExp('(' + polyfillHost +
-        ')(?:\\((' +
+    // note: :ancestor pre-processed to -shadowcssancestor.
+    polyfillAncestor = '-shadowcssancestor',
+    parenSuffix = ')(?:\\((' +
         '(?:\\([^)(]*\\)|[^)(]*)+?' +
-        ')\\))?([^,{]*)', 'gim'),
+        ')\\))?([^,{]*)';
+    cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),
+    cssColonAncestorRe = new RegExp('(' + polyfillAncestor + parenSuffix, 'gim'),
     selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$',
     hostRe = /@host/gim,
     colonHostRe = /\:host/gim,
+    colonAncestorRe = /\:ancestor/gim,
     /* host name without combinator */
     polyfillHostNoCombinator = polyfillHost + '-no-combinator',
     polyfillHostRe = new RegExp(polyfillHost, 'gim');
+    polyfillAncestorRe = new RegExp(polyfillAncestor, 'gim');
 
 function stylesToCssText(styles, preserveComments) {
   var cssText = '';
@@ -6717,6 +7498,7 @@
   if (!sheet) {
     sheet = document.createElement("style");
     sheet.setAttribute('ShadowCSSShim', '');
+    sheet.shadowCssShim = true;
   }
   return sheet;
 }
@@ -6724,8 +7506,42 @@
 // add polyfill stylesheet to document
 if (window.ShadowDOMPolyfill) {
   addCssToDocument('style { display: none !important; }\n');
-  var head = document.querySelector('head');
+  var doc = wrap(document);
+  var head = doc.querySelector('head');
   head.insertBefore(getSheet(), head.childNodes[0]);
+
+  document.addEventListener('DOMContentLoaded', function() {
+    if (window.HTMLImports && !HTMLImports.useNative) {
+      HTMLImports.importer.preloadSelectors += 
+          ', link[rel=stylesheet]:not([nopolyfill])';
+      HTMLImports.parser.parseGeneric = function(elt) {
+        if (elt.shadowCssShim) {
+          return;
+        }
+        var style = elt;
+        if (!elt.hasAttribute('nopolyfill')) {
+          if (elt.__resource) {
+            style = elt.ownerDocument.createElement('style');
+            style.textContent = Platform.loader.resolveUrlsInCssText(
+                elt.__resource, elt.href);
+            // remove links from main document
+            if (elt.ownerDocument === doc) {
+              elt.parentNode.removeChild(elt);
+            }
+          } else {
+            Platform.loader.resolveUrlsInStyle(style);  
+          }
+          var styles = [style];
+          style.textContent = ShadowCSS.stylesToShimmedCssText(styles, styles);
+          style.shadowCssShim = true;
+        }
+        // place in document
+        if (style.parentNode !== head) {
+          head.appendChild(style);
+        }
+      }
+    }
+  });
 }
 
 // exports
diff --git a/pkg/shadow_dom/lib/shadow_dom.min.js b/pkg/shadow_dom/lib/shadow_dom.min.js
index a0ff506..c4c13c8 100644
--- a/pkg/shadow_dom/lib/shadow_dom.min.js
+++ b/pkg/shadow_dom/lib/shadow_dom.min.js
@@ -1,3 +1,3 @@
-if(!HTMLElement.prototype.createShadowRoot||window.__forceShadowDomPolyfill){!function(){Element.prototype.webkitCreateShadowRoot&&(Element.prototype.webkitCreateShadowRoot=function(){return window.ShadowDOMPolyfill.wrapIfNeeded(this).createShadowRoot()})}(),function(a){"use strict";function b(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={};if(Object.observe(c,a),c.id=1,c.id=2,delete c.id,Object.deliverChangeRecords(a),3!==b.length)return!1;if("new"==b[0].type&&"updated"==b[1].type&&"deleted"==b[2].type)F="new",G="updated",H="reconfigured",I="deleted";else if("add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type)return console.error("Unexpected change record names for Object.observe. Using dirty-checking instead"),!1;return Object.unobserve(c,a),c=[0],Array.observe(c,a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),2!=b.length?!1:b[0].type!=J||b[1].type!=J?!1:(Array.unobserve(c,a),!0)}function c(){if(a.document&&"securityPolicy"in a.document&&!a.document.securityPolicy.allowsEval)return!1;try{var b=new Function("","return true;");return b()}catch(c){return!1}}function d(a){return+a===a>>>0}function e(a){return+a}function f(a){return a===Object(a)}function g(a,b){return a===b?0!==a||1/a===1/b:M(a)&&M(b)?!0:a!==a&&b!==b}function h(a){return"string"!=typeof a?!1:(a=a.trim(),""==a?!0:"."==a[0]?!1:U.test(a))}function i(a,b){if(b!==V)throw Error("Use Path.get to retrieve path objects");return""==a.trim()?this:d(a)?(this.push(a),this):(a.split(/\s*\.\s*/).filter(function(a){return a}).forEach(function(a){this.push(a)},this),L&&!K&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn()),void 0)}function j(a){if(a instanceof i)return a;null==a&&(a=""),"string"!=typeof a&&(a=String(a));var b=W[a];if(b)return b;if(!h(a))return X;var b=new i(a,V);return W[a]=b,b}function k(b){for(var c=0;Y>c&&b.check();)b.report(),c++;a.testingExposeCycleCount&&(a.dirtyCheckCycleCount=c)}function l(a){for(var b in a)return!1;return!0}function m(a){return l(a.added)&&l(a.removed)&&l(a.changed)}function n(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function o(a,b){var c=b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.isArray(a)&&(c.length=a.length),c}function p(a,b,c,d){if(this.closed=!1,this.object=a,this.callback=b,this.target=c,this.token=d,this.reporting=!0,K){var e=this;this.boundInternalCallback=function(a){e.internalCallback(a)}}q(this)}function q(a){$&&(Z.push(a),p._allObserversCount++)}function r(a,b,c,d){p.call(this,a,b,c,d),this.connect(),this.sync(!0)}function s(a,b,c,d){if(!Array.isArray(a))throw Error("Provided object is not an Array");r.call(this,a,b,c,d)}function t(a){this.arr=[],this.callback=a,this.isObserved=!0}function u(a,b,c,d,e,g,h){var b=b instanceof i?b:j(b);return b&&b.length&&f(a)?(p.call(this,a,c,d,e),this.valueFn=g,this.setValueFn=h,this.path=b,this.connect(),this.sync(!0),void 0):(this.value_=b?b.getValueFrom(a):void 0,this.value=g?g(this.value_):this.value_,this.closed=!0,void 0)}function v(a,b,c,d){p.call(this,void 0,a,b,c),this.valueFn=d,this.observed=[],this.values=[],this.value=void 0,this.oldValue=void 0,this.oldValues=void 0,this.changeFlags=void 0,this.started=!1}function w(a,b){if("function"==typeof Object.observe){var c=Object.getNotifier(a);return function(d,e){var f={object:a,type:d,name:b};2===arguments.length&&(f.oldValue=e),c.notify(f)}}}function x(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];db[g.type]?(g.name in c||(c[g.name]=g.oldValue),g.type!=G&&(g.type!=F?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}function y(a,b,c){return{index:a,removed:b,addedCount:c}}function z(){}function A(a,b,c,d,e,f){return ib.calcSplices(a,b,c,d,e,f)}function B(a,b,c,d){return c>b||a>d?-1:b==c||d==a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function C(a,b,c,d){for(var e=y(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=B(e.index,e.index+e.removed.length,i.index,i.index+i.addedCount);if(j>=0){a.splice(h,1),h--,g-=i.addedCount-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.removed.length-j;if(e.addedCount||k){var c=i.removed;if(e.index<i.index){var l=e.removed.slice(0,i.index-e.index);Array.prototype.push.apply(l,c),c=l}if(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i.addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index&&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splice(h,0,e),h++;var n=e.addedCount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)}function D(a,b){for(var c=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case J:C(c,g.index,g.removed.slice(),g.addedCount);break;case F:case G:case I:if(!d(g.name))continue;var h=e(g.name);if(0>h)continue;C(c,h,[g.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(g))}}return c}function E(a,b){var c=[];return D(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(A(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var F="add",G="update",H="reconfigure",I="delete",J="splice",K=b(),L=c(),M=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},N="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},O="[$_a-zA-Z]",P="[$_a-zA-Z0-9]",Q=O+"+"+P+"*",R="(?:[0-9]|[1-9]+[0-9]+)",S="(?:"+Q+"|"+R+")",T="(?:"+S+")(?:\\s*\\.\\s*"+S+")*",U=new RegExp("^"+T+"$"),V={},W={};i.get=j,i.prototype=N({__proto__:[],valid:!0,toString:function(){return this.join(".")},getValueFrom:function(a,b){for(var c=0;c<this.length;c++){if(null==a)return;b&&b.observe(a),a=a[this[c]]}return a},compiledGetValueFromFn:function(){var a=this.map(function(a){return d(a)?'["'+a+'"]':"."+a}),b="",c="obj";b+="if (obj != null";for(var e=0;e<this.length-1;e++){{this[e]}c+=a[e],b+=" &&\n     "+c+" != null"}return b+=")\n",c+=a[e],b+="  return "+c+";\nelse\n  return undefined;",new Function("obj",b)},setValueFrom:function(a,b){if(!this.length)return!1;for(var c=0;c<this.length-1;c++){if(!f(a))return!1;a=a[this[c]]}return f(a)?(a[this[c]]=b,!0):!1}});var X=new i("",V);X.valid=!1,X.getValueFrom=X.setValueFrom=function(){};var Y=1e3;p.prototype={internalCallback:function(a){this.closed||this.reporting&&this.check(a)&&(this.report(),this.testingResults&&(this.testingResults.anyChanged=!0))},close:function(){this.closed||(this.object&&"function"==typeof this.object.close&&this.object.close(),this.disconnect(),this.object=void 0,this.closed=!0)},deliver:function(a){this.closed||(K?(this.testingResults=a,Object.deliverChangeRecords(this.boundInternalCallback),this.testingResults=void 0):k(this))},report:function(){this.reporting&&(this.sync(!1),this.callback&&(this.reportArgs.push(this.token),this.invokeCallback(this.reportArgs)),this.reportArgs=void 0)},invokeCallback:function(a){try{this.callback.apply(this.target,a)}catch(b){p._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},reset:function(){this.closed||(K&&(this.reporting=!1,Object.deliverChangeRecords(this.boundInternalCallback),this.reporting=!0),this.sync(!0))}};var Z,$=!K||a.forceCollectObservers;p._allObserversCount=0,$&&(Z=[]);var _=!1,ab="function"==typeof Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=function(){if(!_){if(ab)return Object.deliverAllChangeRecords(),void 0;if($){_=!0;var b=0,c={};do{b++;var d=Z;Z=[],c.anyChanged=!1;for(var e=0;e<d.length;e++){var f=d[e];f.closed||(K?f.deliver(c):f.check()&&(c.anyChanged=!0,f.report()),Z.push(f))}}while(Y>b&&c.anyChanged);a.testingExposeCycleCount&&(a.dirtyCheckCycleCount=b),p._allObserversCount=Z.length,_=!1}}},$&&(a.Platform.clearObservers=function(){Z=[]}),r.prototype=N({__proto__:p.prototype,connect:function(){K&&Object.observe(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject=o(this.object))},check:function(a){var b,c;if(K){if(!a)return!1;c={},b=x(this.object,a,c)}else c=this.oldObject,b=n(this.object,this.oldObject);return m(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}],this.reportArgs.push(function(a){return c[a]}),!0)},disconnect:function(){K?this.object&&Object.unobserve(this.object,this.boundInternalCallback):this.oldObject=void 0}}),s.prototype=N({__proto__:r.prototype,connect:function(){K&&Array.observe(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject=this.object.slice())},check:function(a){var b;if(K){if(!a)return!1;b=E(this.object,a)}else b=A(this.object,0,this.object.length,this.oldObject,0,this.oldObject.length);return b&&b.length?(this.reportArgs=[b],!0):!1}}),s.applySplices=function(a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.length],e=c.index;e<c.index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.apply(a,d)})};var bb=Object.getPrototypeOf({}),cb=Object.getPrototypeOf([]);t.prototype={reset:function(){this.isObserved=!this.isObserved},observe:function(a){if(f(a)&&a!==bb&&a!==cb){var b=this.arr.indexOf(a);b>=0&&this.arr[b+1]===this.isObserved||(0>b&&(b=this.arr.length,this.arr[b]=a,Object.observe(a,this.callback)),this.arr[b+1]=this.isObserved,this.observe(Object.getPrototypeOf(a)))}},cleanup:function(){for(var a=0,b=0,c=this.isObserved;b<this.arr.length;){var d=this.arr[b];this.arr[b+1]==c?(b>a&&(this.arr[a]=d,this.arr[a+1]=c),a+=2):Object.unobserve(d,this.callback),b+=2}this.arr.length=a}},u.prototype=N({__proto__:p.prototype,connect:function(){K&&(this.observedSet=new t(this.boundInternalCallback))},disconnect:function(){this.value=void 0,this.value_=void 0,this.observedSet&&(this.observedSet.reset(),this.observedSet.cleanup(),this.observedSet=void 0)},check:function(){return this.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(this.object,this.observedSet),this.observedSet&&this.observedSet.cleanup(),g(this.value_,this.oldValue_)?!1:(this.value=this.valueFn?this.valueFn(this.value_):this.value_,this.reportArgs=[this.value,this.oldValue],!0)},sync:function(a){a&&(this.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(this.object,this.observedSet),this.value=this.valueFn?this.valueFn(this.value_):this.value_,this.observedSet&&this.observedSet.cleanup()),this.oldValue_=this.value_,this.oldValue=this.value},setValue:function(a){this.path&&("function"==typeof this.setValueFn&&(a=this.setValueFn(a)),this.path.setValueFrom(this.object,a))}}),v.prototype=N({__proto__:u.prototype,addPath:function(a,b){if(this.started)throw Error("Cannot add more paths once started.");var b=b instanceof i?b:j(b),c=b?b.getValueFrom(a):void 0;this.observed.push(a,b),this.values.push(c)},start:function(){this.started=!0,this.connect(),this.sync(!0)},getValues:function(){this.observedSet&&this.observedSet.reset();for(var a=!1,b=0;b<this.observed.length;b+=2){var c=this.observed[b+1];if(c){var d=this.observed[b],e=c.getValueFrom(d,this.observedSet),f=this.values[b/2];if(!g(e,f)){if(!a&&!this.valueFn){this.oldValues=this.oldValues||[],this.changeFlags=this.changeFlags||[];for(var h=0;h<this.values.length;h++)this.oldValues[h]=this.values[h],this.changeFlags[h]=!1}this.valueFn||(this.changeFlags[b/2]=!0),this.values[b/2]=e,a=!0}}}return this.observedSet&&this.observedSet.cleanup(),a},check:function(){if(this.getValues()){if(this.valueFn){if(this.value=this.valueFn(this.values),g(this.value,this.oldValue))return!1;this.reportArgs=[this.value,this.oldValue]}else this.reportArgs=[this.values,this.oldValues,this.changeFlags,this.observed];return!0}},sync:function(a){a&&(this.getValues(),this.valueFn&&(this.value=this.valueFn(this.values))),this.valueFn&&(this.oldValue=this.value)},close:function(){if(this.observed){for(var a=0;a<this.observed.length;a+=2){var b=this.observed[a];b&&"function"==typeof b.close&&b.close()}this.observed=void 0,this.values=void 0}p.prototype.close.call(this)}});var db={};db[F]=!0,db[G]=!0,db[I]=!0,u.defineProperty=function(a,b,c,d){d=j(d);var e=w(a,b),f=new u(c,d,function(a,b){e&&e(G,b)});return Object.defineProperty(a,b,{get:function(){return d.getValueFrom(c)},set:function(a){d.setValueFrom(c,a)},configurable:!0}),{close:function(){var g=d.getValueFrom(c);e&&f.deliver(),f.close(),Object.defineProperty(a,b,{value:g,writable:!0,configurable:!0})}}};var eb=0,fb=1,gb=2,hb=3;z.prototype={calcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g==d?e.push(eb):(e.push(fb),d=g),b--,c--):f==h?(e.push(hb),b--,d=h):(e.push(gb),c--,d=i)}else e.push(hb),b--;else e.push(gb),c--;return e.reverse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,c-b==0&&f-e==0)return[];if(b==c){for(var j=y(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[y(b,[],c-b)];for(var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case eb:j&&(l.push(j),j=void 0),m++,n++;break;case fb:j||(j=y(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case gb:j||(j=y(m,[],0)),j.addedCount++,m++;break;case hb:j||(j=y(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var ib=new z;a.Observer=p,a.Observer.hasObjectObserve=K,a.ArrayObserver=s,a.ArrayObserver.calculateSplices=function(a,b){return ib.calculateSplices(a,b)},a.ArraySplice=z,a.ObjectObserver=r,a.PathObserver=u,a.CompoundPathObserver=v,a.Path=i,a.Observer.changeRecordTypes={add:F,update:G,reconfigure:H,"delete":I,splice:J}}("undefined"!=typeof global&&global?global:this||window),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMap=c}(),window.ShadowDOMPolyfill={},function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return L(b).forEach(function(c){K(a,c,M(b,c))}),a}function d(a,b){return L(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}K(a,c,M(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a),c=E.get(b);if(c)return c;var d=f(b),e=t(d);return q(b,e,a),e}function g(a,b){o(a,b,!0)}function h(a,b){o(b,a,!1)}function i(a){return/^on[a-z]+$/.test(a)}function j(a){return/^\w[a-zA-Z_0-9]*$/.test(a)}function k(a){return H&&j(a)?new Function("return this.impl."+a):function(){return this.impl[a]}}function l(a){return H&&j(a)?new Function("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){return H&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):function(){return this.impl[a].apply(this.impl,arguments)}}function n(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return O}}function o(b,c,d){for(var e=L(b),f=0;f<e.length;f++){var g=e[f];if("polymerBlackList_"!==g&&!(g in c||b.polymerBlackList_&&b.polymerBlackList_[g])){N&&b.__lookupGetter__(g);var h,j,o=n(b,g);if(d&&"function"==typeof o.value)c[g]=m(g);else{var p=i(g);h=p?a.getEventHandlerGetter(g):k(g),(o.writable||o.set)&&(j=p?a.getEventHandlerSetter(g):l(g)),K(c,g,{get:h,set:j,configurable:o.configurable,enumerable:o.enumerable})}}}}function p(a,b,c){var e=a.prototype;q(e,b,c),d(b,a)}function q(a,c,d){var e=c.prototype;b(void 0===E.get(a)),E.set(a,c),F.set(e,a),g(a,e),d&&h(e,d),K(e,"constructor",{value:c,configurable:!0,enumerable:!1,writable:!0})}function r(a,b){return E.get(b.prototype)===a}function s(a){var b=Object.getPrototypeOf(a),c=f(b),d=t(c);return q(b,d,a),d}function t(a){function b(b){a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}function u(a){return a instanceof G.EventTarget||a instanceof G.Event||a instanceof G.Range||a instanceof G.DOMImplementation||a instanceof G.CanvasRenderingContext2D||G.WebGLRenderingContext&&a instanceof G.WebGLRenderingContext}function v(a){return a instanceof R||a instanceof Q||a instanceof S||a instanceof T||a instanceof P||a instanceof U||V&&a instanceof V}function w(a){return null===a?null:(b(v(a)),a.polymerWrapper_||(a.polymerWrapper_=new(f(a))(a)))}function x(a){return null===a?null:(b(u(a)),a.impl)}function y(a){return a&&u(a)?x(a):a}function z(a){return a&&!u(a)?w(a):a}function A(a,c){null!==c&&(b(v(a)),b(void 0===c||u(c)),a.polymerWrapper_=c)}function B(a,b,c){K(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function C(a,b){B(a,b,function(){return w(this.impl[b])})}function D(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=z(this);return a[b].apply(a,arguments)}})})}var E=new WeakMap,F=new WeakMap,G=Object.create(null),H=!("securityPolicy"in document)||document.securityPolicy.allowsEval;if(H)try{var I=new Function("","return true;");H=I()}catch(J){H=!1}var K=Object.defineProperty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor;L(window);var N=/Firefox/.test(navigator.userAgent),O={get:function(){},set:function(){},configurable:!0,enumerable:!0},P=window.DOMImplementation,Q=window.Event,R=window.Node,S=window.Window,T=window.Range,U=window.CanvasRenderingContext2D,V=window.WebGLRenderingContext;a.assert=b,a.constructorTable=E,a.defineGetter=B,a.defineWrapGetter=C,a.forwardMethodsToWrapper=D,a.isWrapperFor=r,a.mixin=c,a.nativePrototypeTable=F,a.oneOf=e,a.registerObject=s,a.registerWrapper=p,a.rewrap=A,a.unwrap=x,a.unwrapIfNeeded=y,a.wrap=w,a.wrapIfNeeded=z,a.wrappers=G}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b<a.length;b++)a[b]()}function c(a){f.push(a),g||(g=!0,d(b,0))}var d,e=window.MutationObserver,f=[],g=!1;if(e){var h=1,i=new e(b),j=document.createTextNode(h);i.observe(j,{characterData:!0}),d=function(){h=(h+1)%2,j.data=h}}else d=window.setImmediate||window.setTimeout;a.setEndOfMicrotask=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){p||(k(c),p=!0)}function c(){p=!1;do for(var a=o.slice(),b=!1,c=0;c<a.length;c++){var d=a[c],e=d.takeRecords();f(d),e.length&&(d.callback_(e,d),b=!0)}while(b)}function d(a,b){this.type=a,this.target=b,this.addedNodes=new m.NodeList,this.removedNodes=new m.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function e(a,b){for(;a;a=a.parentNode){var c=n.get(a);if(c)for(var d=0;d<c.length;d++){var e=c[d];e.options.subtree&&e.addTransientObserver(b)}}}function f(a){for(var b=0;b<a.nodes_.length;b++){var c=a.nodes_[b],d=n.get(c);if(!d)return;for(var e=0;e<d.length;e++){var f=d[e];f.observer===a&&f.removeTransientObservers()}}}function g(a,c,e){for(var f=Object.create(null),g=Object.create(null),h=a;h;h=h.parentNode){var i=n.get(h);if(i)for(var j=0;j<i.length;j++){var k=i[j],l=k.options;if((h===a||l.subtree)&&!("attributes"===c&&!l.attributes||"attributes"===c&&l.attributeFilter&&(null!==e.namespace||-1===l.attributeFilter.indexOf(e.name))||"characterData"===c&&!l.characterData||"childList"===c&&!l.childList)){var m=k.observer;f[m.uid_]=m,("attributes"===c&&l.attributeOldValue||"characterData"===c&&l.characterDataOldValue)&&(g[m.uid_]=e.oldValue)}}}var o=!1;for(var p in f){var m=f[p],q=new d(c,a);"name"in e&&"namespace"in e&&(q.attributeName=e.name,q.attributeNamespace=e.namespace),e.addedNodes&&(q.addedNodes=e.addedNodes),e.removedNodes&&(q.removedNodes=e.removedNodes),e.previousSibling&&(q.previousSibling=e.previousSibling),e.nextSibling&&(q.nextSibling=e.nextSibling),void 0!==g[p]&&(q.oldValue=g[p]),m.records_.push(q),o=!0}o&&b()}function h(a){if(this.childList=!!a.childList,this.subtree=!!a.subtree,this.attributes="attributes"in a||!("attributeOldValue"in a||"attributeFilter"in a)?!!a.attributes:!0,this.characterData="characterDataOldValue"in a&&!("characterData"in a)?!0:!!a.characterData,!this.attributes&&(a.attributeOldValue||"attributeFilter"in a)||!this.characterData&&a.characterDataOldValue)throw new TypeError;if(this.characterData=!!a.characterData,this.attributeOldValue=!!a.attributeOldValue,this.characterDataOldValue=!!a.characterDataOldValue,"attributeFilter"in a){if(null==a.attributeFilter||"object"!=typeof a.attributeFilter)throw new TypeError;this.attributeFilter=q.call(a.attributeFilter)}else this.attributeFilter=null}function i(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++r,o.push(this)}function j(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var k=a.setEndOfMicrotask,l=a.wrapIfNeeded,m=a.wrappers,n=new WeakMap,o=[],p=!1,q=Array.prototype.slice,r=0;i.prototype={observe:function(a,b){a=l(a);var c,d=new h(b),e=n.get(a);e||n.set(a,e=[]);for(var f=0;f<e.length;f++)e[f].observer===this&&(c=e[f],c.removeTransientObservers(),c.options=d);c||(c=new j(this,a,d),e.push(c),this.nodes_.push(a))},disconnect:function(){this.nodes_.forEach(function(a){for(var b=n.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}},j.prototype={addTransientObserver:function(a){if(a!==this.target){this.transientObservedNodes.push(a);var b=n.get(a);b||n.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[];for(var b=0;b<a.length;b++)for(var c=a[b],d=n.get(c),e=0;e<d.length;e++)if(d[e]===this){d.splice(e,1);break}}},a.enqueueMutation=g,a.registerTransientObservers=e,a.wrappers.MutationObserver=i,a.wrappers.MutationRecord=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a instanceof O.ShadowRoot}function c(a){var b=a.localName;return"content"===b||"shadow"===b}function d(a){return!!a.shadowRoot}function e(a){var b;return a.parentNode||(b=a.defaultView)&&N(b)||null}function f(f,g,h){if(h.length)return h.shift();if(b(f))return j(f)||f.host;var i=a.eventParentsTable.get(f);if(i){for(var k=1;k<i.length;k++)h[k-1]=i[k];return i[0]}if(g&&c(f)){var l=f.parentNode;if(l&&d(l))for(var m=a.getShadowTrees(l),n=j(g),k=0;k<m.length;k++)if(m[k].contains(n))return n}return e(f)}function g(a){for(var d=[],e=a,g=[],i=[];e;){var j=null;if(c(e)){j=h(d);var k=d[d.length-1]||e;d.push(k)}else d.length||d.push(e);var l=d[d.length-1];g.push({target:l,currentTarget:e}),b(e)&&d.pop(),e=f(e,j,i)}return g}function h(a){for(var b=a.length-1;b>=0;b--)if(!c(a[b]))return a[b];return null}function i(a,d){for(var e=[];a;){for(var g=[],i=d,j=void 0;i;){var l=null;if(g.length){if(c(i)&&(l=h(g),k(j))){var n=g[g.length-1];g.push(n)}}else g.push(i);if(m(i,a))return g[g.length-1];b(i)&&g.pop(),j=i,i=f(i,l,e)}a=b(a)?a.host:a.parentNode}}function j(b){return a.insertionParentTable.get(b)}function k(a){return j(a)}function l(a){for(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a)===l(b)}function n(a,b){return a===b?!0:a instanceof O.ShadowRoot?n(l(a.host),b):!1}function o(b){if(!Q.get(b)){Q.set(b,!0),a.renderAllPending();var c=N(b.target),d=N(b);return p(d,c)}}function p(a,b){var c=g(b);return"load"===a.type&&2===c.length&&c[0].target instanceof O.Document&&c.shift(),Y.set(a,c),q(a,c)&&r(a,c)&&s(a,c),U.set(a,v.NONE),S.set(a,null),a.defaultPrevented}function q(a,b){for(var c,d=b.length-1;d>0;d--){var e=b[d].target,f=b[d].currentTarget;if(e!==f&&(c=v.CAPTURING_PHASE,!t(b[d],a,c)))return!1}return!0}function r(a,b){var c=v.AT_TARGET;return t(b[0],a,c)}function s(a,b){for(var c,d=a.bubbles,e=1;e<b.length;e++){var f=b[e].target,g=b[e].currentTarget;if(f===g)c=v.AT_TARGET;else{if(!d||W.get(a))continue;c=v.BUBBLING_PHASE}if(!t(b[e],a,c))return}}function t(a,b,c){var d=a.target,e=a.currentTarget,f=P.get(e);if(!f)return!0;if("relatedTarget"in b){var g=M(b);if(g.relatedTarget){var h=N(g.relatedTarget),j=i(e,h);if(j===d)return!0;T.set(b,j)}}U.set(b,c);var k=b.type,l=!1;R.set(b,d),S.set(b,e);for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else if(!(n.type!==k||!n.capture&&c===v.CAPTURING_PHASE||n.capture&&c===v.BUBBLING_PHASE))try{if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),W.get(b))return!1}catch(o){window.onerror?window.onerror(o.message):console.error(o,o.stack)}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p[m].removed||f.push(p[m])}return!V.get(b)}function u(a,b,c){this.type=a,this.handler=b,this.capture=Boolean(c)}function v(a,b){return a instanceof Z?(this.impl=a,void 0):N(z(Z,"Event",a,b))}function w(a){return a&&a.relatedTarget?Object.create(a,{relatedTarget:{value:M(a.relatedTarget)}}):a}function x(a,b,c){var d=window[a],e=function(b,c){return b instanceof d?(this.impl=b,void 0):N(z(d,a,b,c))};return e.prototype=Object.create(b.prototype),c&&K(e.prototype,c),d&&(d.prototype["init"+a]?L(d,e,document.createEvent(a)):L(d,e,new d("temp"))),e}function y(a,b){return function(){arguments[b]=M(arguments[b]);var c=M(this);c[a].apply(c,arguments)}}function z(a,b,c,d){if(gb)return new a(c,w(d));var e=M(document.createEvent(b)),f=fb[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a];"relatedTarget"===a&&(b=M(b)),g.push(b)}),e["init"+b].apply(e,g),e}function A(){v.call(this)}function B(a){return"function"==typeof a?!0:a&&a.handleEvent}function C(a){switch(a){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function D(a){this.impl=a}function E(a){return a instanceof O.ShadowRoot&&(a=a.host),M(a)}function F(a){J(a,jb)}function G(b,c,d,e){a.renderAllPending();for(var f=N(kb.call(c.impl,d,e)),h=g(f,this),i=0;i<h.length;i++){var j=h[i];if(j.currentTarget===b)return j.target}return null}function H(a){return function(){var b=X.get(this);return b&&b[a]&&b[a].value||null}}function I(a){var b=a.slice(2);return function(c){var d=X.get(this);d||(d=Object.create(null),X.set(this,d));var e=d[a];if(e&&this.removeEventListener(b,e.wrapped,!1),"function"==typeof c){var f=function(b){var d=c.call(this,b);d===!1?b.preventDefault():"onbeforeunload"===a&&"string"==typeof d&&(b.returnValue=d)};this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f}}}}var J=a.forwardMethodsToWrapper,K=a.mixin,L=a.registerWrapper,M=a.unwrap,N=a.wrap,O=a.wrappers,P=(new WeakMap,new WeakMap),Q=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakMap,U=new WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap;u.prototype={equals:function(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var Z=window.Event;Z.prototype.polymerBlackList_={returnValue:!0},v.prototype={get target(){return R.get(this)},get currentTarget(){return S.get(this)},get eventPhase(){return U.get(this)},get path(){var a=new O.NodeList,b=Y.get(this);if(b){for(var c=0,d=b.length-1,e=l(S.get(this)),f=0;d>=f;f++){var g=b[f].currentTarget,h=l(g);n(e,h)&&(f!==d||g instanceof O.Node)&&(a[c++]=g)}a.length=c}return a},stopPropagation:function(){V.set(this,!0)},stopImmediatePropagation:function(){V.set(this,!0),W.set(this,!0)}},L(Z,v,document.createEvent("Event"));var $=x("UIEvent",v),_=x("CustomEvent",v),ab={get relatedTarget(){return T.get(this)||N(M(this).relatedTarget)}},bb=K({initMouseEvent:y("initMouseEvent",14)},ab),cb=K({initFocusEvent:y("initFocusEvent",5)},ab),db=x("MouseEvent",$,bb),eb=x("FocusEvent",$,cb),fb=Object.create(null),gb=function(){try{new window.MouseEvent("click")}catch(a){return!1}return!0}();if(!gb){var hb=function(a,b,c){if(c){var d=fb[c];b=K(K({},d),b)}fb[a]=b};hb("Event",{bubbles:!1,cancelable:!1}),hb("CustomEvent",{detail:null},"Event"),hb("UIEvent",{view:null,detail:0},"Event"),hb("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),hb("FocusEvent",{relatedTarget:null},"UIEvent")}A.prototype=Object.create(v.prototype),K(A.prototype,{get returnValue(){return this.impl.returnValue},set returnValue(a){this.impl.returnValue=a}});var ib=window.EventTarget,jb=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prototype;jb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),D.prototype={addEventListener:function(a,b,c){if(B(b)&&!C(a)){var d=new u(a,b,c),e=P.get(this);if(e){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],P.set(this,e);e.push(d);var g=E(this);g.addEventListener_(a,o,!0)}},removeEventListener:function(a,b,c){c=Boolean(c);var d=P.get(this);if(d){for(var e=0,f=!1,g=0;g<d.length;g++)d[g].type===a&&d[g].capture===c&&(e++,d[g].handler===b&&(f=!0,d[g].remove()));if(f&&1===e){var h=E(this);h.removeEventListener_(a,o,!0)}}},dispatchEvent:function(a){var b=E(this),c=M(a);return Q.set(c,!1),b.dispatchEvent_(c)}},ib&&L(ib,D);var kb=document.elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=G,a.getEventHandlerGetter=H,a.getEventHandlerSetter=I,a.wrapEventTargetMethods=F,a.wrappers.BeforeUnloadEvent=A,a.wrappers.CustomEvent=_,a.wrappers.Event=v,a.wrappers.EventTarget=D,a.wrappers.FocusEvent=eb,a.wrappers.MouseEvent=db,a.wrappers.UIEvent=$}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,{enumerable:!1})}function c(){this.length=0,b(this,"length")}function d(a){if(null==a)return a;for(var b=new c,d=0,e=a.length;e>d;d++)b[d]=f(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=function(){return d(this.impl[b].apply(this.impl,arguments))}}var f=a.wrap;c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){v(a instanceof s)}function c(a){var b=new u;return b[0]=a,b.length=1,b}function d(a,b,c){x(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){x(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);E=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;E=!1;for(var g=0;g<f.length;g++)f[g].previousSibling_=f[g-1]||d,f[g].nextSibling_=f[g+1]||e;return d&&(d.nextSibling_=f[0]),e&&(e.previousSibling_=f[f.length-1]),f
-}var f=c(a),i=a.parentNode;return i&&i.removeChild(a),a.parentNode_=b,a.previousSibling_=d,a.nextSibling_=e,d&&(d.nextSibling_=a),e&&(e.previousSibling_=a),f}function g(a){if(a instanceof DocumentFragment)return h(a);var b=c(a),e=a.parentNode;return e&&d(a,e,b),b}function h(a){for(var b=new u,c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b.length=c,e(a,b),b}function i(a){return a}function j(a){a.nodeIsInserted_()}function k(a){for(var b=0;b<a.length;b++)j(a[b])}function l(){}function m(){}function n(a,b){var c=a.nodeType===s.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c.adoptNode(b)}function o(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].ownerDocument)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function p(a,b){o(a,b);var c=b.length;if(1===c)return B(b[0]);for(var d=B(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild(B(b[e]));return d}function q(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){v(b.parentNode===a);var c=b.nextSibling,d=B(b),e=d.parentNode;e&&J.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=B(a),g=f.firstChild;g;)c=g.nextSibling,J.call(f,g),g=c}function r(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function s(a){v(a instanceof F),t.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var t=a.wrappers.EventTarget,u=a.wrappers.NodeList,v=a.assert,w=a.defineWrapGetter,x=a.enqueueMutation,y=a.mixin,z=a.registerTransientObservers,A=a.registerWrapper,B=a.unwrap,C=a.wrap,D=a.wrapIfNeeded,E=!1,F=window.Node,G=window.DocumentFragment,H=(F.prototype.appendChild,F.prototype.compareDocumentPosition),I=F.prototype.insertBefore,J=F.prototype.removeChild,K=F.prototype.replaceChild,L=/Trident/.test(navigator.userAgent),M=L?function(a,b){try{J.call(a,b)}catch(c){if(!(a instanceof G))throw c}}:function(a,b){J.call(a,b)};s.prototype=Object.create(t.prototype),y(s.prototype,{appendChild:function(a){return this.insertBefore(a,null)},insertBefore:function(a,c){b(a),c=c||null,c&&b(c),c&&v(c.parentNode===this);var d,e=c?c.previousSibling:this.lastChild,h=!this.invalidateShadowRenderer()&&!r(a);if(d=h?g(a):f(a,this,e,c),h)n(this,a),I.call(this.impl,B(a),B(c));else{e||(this.firstChild_=d[0]),c||(this.lastChild_=d[d.length-1]);var i=B(c),j=i?i.parentNode:this.impl;j?I.call(j,p(this,d),i):o(this,d)}return x(this,"childList",{addedNodes:d,nextSibling:c,previousSibling:e}),k(d),a},removeChild:function(a){if(b(a),a.parentNode!==this){for(var d=!1,e=(this.childNodes,this.firstChild);e;e=e.nextSibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundError")}var f=B(a),g=a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRenderer()){var i=this.firstChild,j=this.lastChild,k=f.parentNode;k&&M(k,f),i===a&&(this.firstChild_=g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previousSibling_=h),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else M(this.impl,f);return E||x(this,"childList",{removedNodes:c(a),nextSibling:g,previousSibling:h}),z(this,a),a},replaceChild:function(a,d){if(b(a),b(d),d.parentNode!==this)throw new Error("NotFoundError");var e,h=B(d),i=d.nextSibling,j=d.previousSibling,m=!this.invalidateShadowRenderer()&&!r(a);return m?e=g(a):(i===a&&(i=a.nextSibling),e=f(a,this,j,i)),m?(n(this,a),K.call(this.impl,B(a),h)):(this.firstChild===d&&(this.firstChild_=e[0]),this.lastChild===d&&(this.lastChild_=e[e.length-1]),d.previousSibling_=d.nextSibling_=d.parentNode_=void 0,h.parentNode&&K.call(h.parentNode,p(this,e),h)),x(this,"childList",{addedNodes:e,removedNodes:c(d),nextSibling:i,previousSibling:j}),l(d),k(e),d},nodeIsInserted_:function(){for(var a=this.firstChild;a;a=a.nextSibling)a.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:C(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:C(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:C(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:C(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:C(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==s.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textContent(a){var b=i(this.childNodes);if(this.invalidateShadowRenderer()){if(q(this),""!==a){var c=this.impl.ownerDocument.createTextNode(a);this.appendChild(c)}}else this.impl.textContent=a;var d=i(this.childNodes);x(this,"childList",{addedNodes:d,removedNodes:b}),m(b),k(d)},get childNodes(){for(var a=new u,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){var b=C(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));return b},contains:function(a){if(!a)return!1;if(a=D(a),a===this)return!0;var b=a.parentNode;return b?this.contains(b):!1},compareDocumentPosition:function(a){return H.call(this.impl,B(a))}}),w(s,"ownerDocument"),A(F,s,document.createDocumentFragment()),delete s.prototype.querySelector,delete s.prototype.querySelectorAll,s.prototype=y(Object.create(t.prototype),s.prototype),a.nodeWasAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a.nodesWereRemoved=m,a.snapshotNodeList=i,a.wrappers.Node=s}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,c){for(var d,e=a.firstElementChild;e;){if(e.matches(c))return e;if(d=b(e,c))return d;e=e.nextElementSibling}return null}function c(a,b,d){for(var e=a.firstElementChild;e;)e.matches(b)&&(d[d.length++]=e),c(e,b,d),e=e.nextElementSibling;return d}var d={querySelector:function(a){return b(this,a)},querySelectorAll:function(a){return c(this,a,new NodeList)}},e={getElementsByTagName:function(a){return this.querySelectorAll(a)},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){if("*"===a)return this.getElementsByTagName(b);for(var c=new NodeList,d=this.getElementsByTagName(b),e=0,f=0;e<d.length;e++)d[e].namespaceURI===a&&(c[f++]=d[e]);return c.length=f,c}};a.GetElementsByInterface=e,a.SelectorsInterface=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.previousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h=window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a},get data(){return this.impl.data},set data(a){var b=this.impl.data;e(this,"characterData",{oldValue:b}),this.impl.data=a}}),f(b.prototype,c),g(h,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){h.call(this,a)}function e(a,c,d){var e=d||c;Object.defineProperty(a,c,{get:function(){return this.impl[c]},set:function(a){this.impl[c]=a,b(this,e)},configurable:!0,enumerable:!0})}var f=a.ChildNodeInterface,g=a.GetElementsByInterface,h=a.wrappers.Node,i=a.ParentNodeInterface,j=a.SelectorsInterface,k=(a.addWrapNodeListMethod,a.enqueueMutation),l=a.mixin,m=a.oneOf,n=a.registerWrapper,o=a.wrappers,p=window.Element,q=m(p.prototype,["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"]),r=p.prototype[q];d.prototype=Object.create(h.prototype),l(d.prototype,{createShadowRoot:function(){var b=new o.ShadowRoot(this);this.impl.polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){return this.impl.polymerShadowRoot_||null},setAttribute:function(a,d){var e=this.impl.getAttribute(a);this.impl.setAttribute(a,d),c(this,a,e),b(this,a)},removeAttribute:function(a){var d=this.impl.getAttribute(a);this.impl.removeAttribute(a),c(this,a,d),b(this,a)},matches:function(a){return r.call(this.impl,a)}}),d.prototype[q]=function(a){return this.matches(a)},p.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),e(d.prototype,"id"),e(d.prototype,"className","class"),l(d.prototype,f),l(d.prototype,g),l(d.prototype,i),l(d.prototype,j),n(p,d),a.matchesName=q,a.wrappers.Element=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a){return a.replace(v,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE:for(var b,d=a.tagName.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" "+b.name+'="'+c(b.value)+'"';return f+=">",w[d]?f:f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);case Node.COMMENT_NODE:return"<!--"+c(a.nodeValue)+"-->";default:throw console.error(a),new Error("not implemented")}}function e(a){for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c){var d=c||"div";a.textContent="";var e=t(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(u(f))}function g(a){l.call(this,a)}function h(b){return function(){return a.renderAllPending(),this.impl[b]}}function i(a){m(g,a,h(a))}function j(b){Object.defineProperty(g.prototype,b,{get:h(b),set:function(c){a.renderAllPending(),this.impl[b]=c},configurable:!0,enumerable:!0})}function k(b){Object.defineProperty(g.prototype,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var l=a.wrappers.Element,m=a.defineGetter,n=a.enqueueMutation,o=a.mixin,p=a.nodesWereAdded,q=a.nodesWereRemoved,r=a.registerWrapper,s=a.snapshotNodeList,t=a.unwrap,u=a.wrap,v=/&|<|"/g,w={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},x=window.HTMLElement;g.prototype=Object.create(l.prototype),o(g.prototype,{get innerHTML(){return e(this)},set innerHTML(a){var b=s(this.childNodes);this.invalidateShadowRenderer()?f(this,a,this.tagName):this.impl.innerHTML=a;var c=s(this.childNodes);n(this,"childList",{addedNodes:c,removedNodes:b}),q(b),p(c)},get outerHTML(){return d(this)},set outerHTML(a){var b=this.parentNode;b&&(b.invalidateShadowRenderer(),this.impl.outerHTML=a)}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(i),["scrollLeft","scrollTop"].forEach(j),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(k),r(x,g,document.createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.setInnerHTML=f}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getContext.apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return this.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var e=f(document.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=m.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);m.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=j(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!n){var b=c(a);l.set(this,k(b))}}var e=a.wrappers.HTMLElement,f=a.getInnerHTML,g=a.mixin,h=a.registerWrapper,i=a.setInnerHTML,j=a.unwrap,k=a.wrap,l=new WeakMap,m=new WeakMap,n=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content(){return n?k(this.impl.content):l.get(this)},get innerHTML(){return f(this.content)},set innerHTML(a){i(this.content,a)}}),n&&h(n,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.");var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,arguments)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={get startContainer(){return f(this.impl.startContainer)},get endContainer(){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(this.impl.commonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b)},setEnd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this.impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e(a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extractContents:function(){return f(this.impl.extractContents())},cloneContents:function(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.insertNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},cloneRange:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNode(e(a))}},g.prototype.createContextualFragment&&(b.prototype.createContextualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(window.Range,b,document.createRange()),a.wrappers.Range=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(document.createDocumentFragment());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createTextNode("")),i=f(document.createComment(""));a.wrappers.Comment=i,a.wrappers.DocumentFragment=g,a.wrappers.Text=h}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=i(a.impl.ownerDocument.createDocumentFragment());c.call(this,b),g(b,this);var d=a.shadowRoot;k.set(this,d),j.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.getInnerHTML,f=a.mixin,g=a.rewrap,h=a.setInnerHTML,i=a.unwrap,j=new WeakMap,k=new WeakMap;b.prototype=Object.create(c.prototype),f(b.prototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return k.get(this)||null},get host(){return j.get(this)||null},invalidateShadowRenderer:function(){return j.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getElementById:function(a){return this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a,c,e){var f=F(a),g=F(c),h=e?F(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.previousSibling_=e.previousSibling;else{a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var i=G(f.lastChild);i&&(i.nextSibling_=i.nextSibling)}f.insertBefore(g,h)}function d(a){var c=F(a),d=c.parentNode;if(d){var e=G(d);b(a),a.previousSibling&&(a.previousSibling.nextSibling_=a),a.nextSibling&&(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.lastChild_=a),e.firstChild===a&&(e.firstChild_=a),d.removeChild(c)}}function e(a,b){g(b).push(a),x(a,b);var c=I.get(a);c||I.set(a,c=[]),c.push(b)}function f(a){H.set(a,[])}function g(a){return H.get(a)}function h(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function i(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling)if(b(d)){if(c(d)===!1)return}else i(d,b,c)}function j(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a instanceof z))return!1;if(!L.test(c))return!1;if(":"===c[0]&&!M.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function k(){for(var a=0;a<O.length;a++)O[a].render();O=[]}function l(){y=null,k()}function m(a){var b=K.get(a);return b||(b=new q(a),K.set(a,b)),b}function n(a){for(;a;a=a.parentNode)if(a instanceof D)return a;return null}function o(a){return m(a.host)}function p(a){this.skip=!1,this.node=a,this.childNodes=[]}function q(a){this.host=a,this.dirty=!1,this.invalidateAttributes(),this.associateNode(a)}function r(a){return a instanceof A}function s(a){return a instanceof A}function t(a){return a instanceof B}function u(a){return a instanceof B}function v(a){return a.shadowRoot}function w(a){for(var b=[],c=a.shadowRoot;c;c=c.olderShadowRoot)b.push(c);return b}function x(a,b){J.set(a,b)}var y,z=a.wrappers.Element,A=a.wrappers.HTMLContentElement,B=a.wrappers.HTMLShadowElement,C=a.wrappers.Node,D=a.wrappers.ShadowRoot,E=(a.assert,a.mixin,a.oneOf),F=a.unwrap,G=a.wrap,H=new WeakMap,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=/^[*.:#[a-zA-Z_|]/,M=new RegExp("^:("+["link","visited","target","enabled","disabled","checked","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of-type","last-of-type","only-of-type"].join("|")+")"),N=E(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),O=[],P=new ArraySplice;P.equals=function(a,b){return F(a.node)===b},p.prototype={append:function(a){var b=new p(a);return this.childNodes.push(b),b},sync:function(a){if(!this.skip){for(var b=this.node,e=this.childNodes,f=h(F(b)),g=a||new WeakMap,i=P.calculateSplices(e,f),j=0,k=0,l=0,m=0;m<i.length;m++){for(var n=i[m];l<n.index;l++)k++,e[j++].sync(g);for(var o=n.removed.length,p=0;o>p;p++){var q=G(f[k++]);g.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&G(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),g.set(u,!0),t.sync(g)}l+=r}for(var m=l;m<e.length;m++)e[m].sync(g)}}},q.prototype={render:function(a){if(this.dirty){this.invalidateAttributes(),this.treeComposition();var b=this.host,c=b.shadowRoot;this.associateNode(b);for(var d=!e,e=a||new p(b),f=c.firstChild;f;f=f.nextSibling)this.renderNode(c,e,f,!1);d&&e.sync(),this.dirty=!1}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,O.push(this),y)return;y=window[N](l,0)}},renderNode:function(a,b,c,d){if(v(c)){b=b.append(c);var e=m(c);e.dirty=!0,e.render(b)}else r(c)?this.renderInsertionPoint(a,b,c,d):t(c)?this.renderShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:function(a,b,c,d){if(b=b.append(c),v(c)){var e=m(c);b.skip=!e.dirty,e.render(b)}else for(var f=c.firstChild;f;f=f.nextSibling)this.renderNode(a,b,f,d)},renderInsertionPoint:function(a,b,c,d){var e=g(c);if(e.length){this.associateNode(c);for(var f=0;f<e.length;f++){var h=e[f];r(h)&&d?this.renderInsertionPoint(a,b,h,d):this.renderAsAnyDomTree(a,b,h,d)}}else this.renderFallbackContent(a,b,c);this.associateNode(c.parentNode)},renderShadowInsertionPoint:function(a,b,c){var d=a.olderShadowRoot;if(d){x(d,c),this.associateNode(c.parentNode);for(var e=d.firstChild;e;e=e.nextSibling)this.renderNode(d,b,e,!0)}else this.renderFallbackContent(a,b,c)},renderFallbackContent:function(a,b,c){this.associateNode(c),this.associateNode(c.parentNode);for(var d=c.firstChild;d;d=d.nextSibling)this.renderAsAnyDomTree(a,b,d,!1)},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(a){if(a){var b=this.attributes;/\.\w+/.test(a)&&(b["class"]=!0),/#\w+/.test(a)&&(b.id=!0),a.replace(/\[\s*([^\s=\|~\]]+)/g,function(a,c){b[c]=!0})}},dependsOnAttribute:function(a){return this.attributes[a]},distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.updateDependentAttributes(a.getAttribute("select"));for(var d=0;d<b.length;d++){var g=b[d];void 0!==g&&j(g,a)&&(e(g,a),b[d]=void 0)}})},treeComposition:function(){for(var a=this.host,b=a.shadowRoot,c=[],d=a.firstChild;d;d=d.nextSibling)if(r(d)){var e=g(d);e&&e.length||(e=h(d)),c.push.apply(c,e)}else c.push(d);for(var f,j;b;){if(f=void 0,i(b,u,function(a){return f=a,!1}),j=f,this.distribute(b,c),j){var k=b.olderShadowRoot;if(k){b=k,x(b,j);continue}break}break}},associateNode:function(a){a.impl.polymerShadowRenderer_=this}},C.prototype.invalidateShadowRenderer=function(){var a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},A.prototype.getDistributedNodes=function(){return k(),g(this)},B.prototype.nodeIsInserted_=A.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var a,b=n(this);b&&(a=o(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a.eventParentsTable=I,a.getRendererForHost=m,a.getShadowTrees=w,a.insertionParentTable=J,a.renderAllPending=k,a.visual={insertBefore:c,remove:d}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);var i=function(a){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.prototype,{get form(){return h(g(this).form)}}),f(window[b],i,document.createElement(b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d=a.assert,e=a.mixin,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLSelectElement","HTMLTextAreaElement"];i.forEach(b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){k.call(this,a)}function c(a){var c=document[a];b.prototype[a]=function(){return v(c.apply(this.impl,arguments))}}function d(a,b){y.call(b.impl,u(a)),e(a,b)}function e(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof n&&f(a,b);for(var c=a.firstChild;c;c=c.nextSibling)e(c,b)}function f(a,b){var c=a.olderShadowRoot;c&&b.adoptNode(c)}function g(a){this.impl=a}function h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return v(c.apply(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply(this.impl,arguments)}}var j=a.GetElementsByInterface,k=a.wrappers.Node,l=a.ParentNodeInterface,m=a.SelectorsInterface,n=a.wrappers.ShadowRoot,o=a.defineWrapGetter,p=a.elementFromPoint,q=a.forwardMethodsToWrapper,r=a.matchesName,s=a.mixin,t=a.registerWrapper,u=a.unwrap,v=a.wrap,w=a.wrapEventTargetMethods,x=(a.wrapNodeList,new WeakMap);b.prototype=Object.create(k.prototype),o(b,"documentElement"),o(b,"body"),o(b,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(c);var y=document.adoptNode,z=document.importNode;if(s(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild(a),d(a,this),a},elementFromPoint:function(a,b){return p(this,this,a,b)},importNode:function(a,b){var c=v(z.call(this.impl,u(a),!1));if(b)for(var d=a.firstChild;d;d=d.nextSibling)c.appendChild(this.importNode(d,!0));return c}}),document.register){var A=document.register;b.prototype.register=function(b,c){function d(a){return a?(this.impl=a,void 0):c.extends?document.createElement(c.extends,b):document.createElement(b)}var e=c.prototype;if(a.nativePrototypeTable.get(e))throw new Error("NotSupportedError");for(var f,g=Object.getPrototypeOf(e),h=[];g&&!(f=a.nativePrototypeTable.get(g));)h.push(g),g=Object.getPrototypeOf(g);if(!f)throw new Error("NotSupportedError");for(var i=Object.create(f),j=h.length-1;j>=0;j--)i=Object.create(i);["createdCallback","enteredViewCallback","leftViewCallback","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(i[a]=function(){b.apply(v(this),arguments)})});var k={prototype:i};c.extends&&(k.extends=c.extends);A.call(u(this),b,k);return d.prototype=e,d.prototype.constructor=d,a.constructorTable.set(i,d),a.nativePrototypeTable.set(e,i),d},q([window.HTMLDocument||window.Document],["register"])}q([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild",r]),q([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","elementFromPoint","getElementById"]),s(b.prototype,j),s(b.prototype,l),s(b.prototype,m),s(b.prototype,{get implementation(){var a=x.get(this);return a?a:(a=new g(u(this).implementation),x.set(this,a),a)}}),t(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&t(window.HTMLDocument,b),w([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocument"),i(g,"hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.unwrapIfNeeded,h=a.wrap,i=a.renderAllPending,j=window.Window;b.prototype=Object.create(c.prototype);var k=window.getComputedStyle;j.prototype.getComputedStyle=function(a,b){return i(),k.call(this||window,g(a),b)},["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(this||window);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:function(a,b){return k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWrapperFor,{a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",data:"HTMLDataElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",time:"HTMLTimeElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTextAreaElement",track:"HTMLTrackElement",title:"HTMLTitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});
-Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElements=c}(window.ShadowDOMPolyfill),function(){{var a=window.ShadowDOMPolyfill;a.wrap}Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot,window.dartExperimentalFixupGetTag=function(b){function c(a){if(a instanceof d)return"NodeList";if(a instanceof e)return"ShadowRoot";if(window.MutationRecord&&a instanceof MutationRecord)return"MutationRecord";if(window.MutationObserver&&a instanceof MutationObserver)return"MutationObserver";if(a instanceof HTMLTemplateElement)return"HTMLTemplateElement";var c=f(a);if(a!==c){var g=a.constructor;if(g===c.constructor){var h=g._ShadowDOMPolyfill$cacheTag_;return h||(h=Object.prototype.toString.call(c),h=h.substring(8,h.length-1),g._ShadowDOMPolyfill$cacheTag_=h),h}a=c}return b(a)}var d=a.wrappers.NodeList,e=a.wrappers.ShadowRoot,f=a.unwrapIfNeeded;return c}}();var Platform={};!function(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c.replace(n,"")),c}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=b.sheet.cssRules;return b.parentNode.removeChild(b),d}function e(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join("\n\n")}function f(a){a&&g().appendChild(document.createTextNode(a))}function g(){return h||(h=document.createElement("style"),h.setAttribute("ShadowCSSShim","")),h}var h,i={strictStyling:!1,registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d),g=this.registerDefinition(a,b,d);this.strictStyling&&this.applyScopeToContent(a,b),this.insertPolyfillDirectives(g.rootStyles),this.insertPolyfillRules(g.rootStyles);var h=this.stylesToShimmedCssText(g.scopeStyles,b,e);h+=this.extractPolyfillUnscopedRules(g.rootStyles),g.shimmedStyle=c(h),a&&(a.shimmedStyle=g.shimmedStyle);for(var i,j=0,k=g.rootStyles.length;k>j&&(i=g.rootStyles[j]);j++)i.parentNode.removeChild(i);f(h)},registerDefinition:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=a?a.querySelectorAll("style"):[];e=e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return!f||a&&!a.querySelector("shadow")||(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},isTypeExtension:function(a){return a&&a.indexOf("-")<0},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b)},this))},insertPolyfillDirectives:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillDirectivesInCssText(a.textContent)},this)},insertPolyfillDirectivesInCssText:function(a){return a.replace(o,function(a,b){return b.slice(0,-2)+"{"})},insertPolyfillRules:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillRulesInCssText(a.textContent)},this)},insertPolyfillRulesInCssText:function(a){return a.replace(p,function(a,b){return b.slice(0,-1)})},extractPolyfillUnscopedRules:function(a){var b="";return a&&Array.prototype.forEach.call(a,function(a){b+=this.extractPolyfillUnscopedRulesFromCssText(a.textContent)+"\n\n"},this),b},extractPolyfillUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";return c},stylesToShimmedCssText:function(a,b,c){return this.shimAtHost(a,b,c)+this.shimScoping(a,b,c)},shimAtHost:function(a,b,c){return a?this.convertAtHostStyles(a,b,c):void 0},convertAtHostStyles:function(a,c,f){var g=b(a),h=this;return g=g.replace(j,function(a,b){return h.scopeHostCss(b,c,f)}),g=e(this.findAtHostRules(d(g),this.makeScopeMatcher(c,f)))},scopeHostCss:function(a,b,c){var d=this;return a.replace(k,function(a,e,f){return d.scopeHostSelector(e,b,c)+" "+f+"\n	"})},scopeHostSelector:function(a,b,c){var d=[],e=a.split(","),f="[is="+b+"]";return e.forEach(function(a){a=a.trim(),a.match(l)?a=a.replace(l,c?f+"$1$3":b+"$1$3"):a.match(m)&&(a=c?f+a:b+a),d.push(a)},this),d.join(", ")},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertScopedStyles(a,b,c):void 0},convertScopedStyles:function(a,c,e){var f=b(a).replace(j,"");f=this.insertPolyfillHostInCssText(f),f=this.convertColonHost(f),f=this.convertPseudos(f),f=this.convertParts(f),f=this.convertCombinators(f);var g=d(f);return f=this.scopeRules(g,c,e)},convertPseudos:function(a){return a.replace(r," [pseudo=$1]")},convertParts:function(a){return a.replace(s," [part=$1]")},convertColonHost:function(a){return a.replace(u,function(a,b,c,d){if(b=y,c){for(var e,f=c.split(","),g=[],h=0,i=f.length;i>h&&(e=f[h]);h++)e=e.trim(),e.match(t)?g.push(b+e.replace(t,"")+d):g.push(b+e+d+", "+e+" "+b+d);return g.join(",")}return b+d})},convertCombinators:function(a){return a.replace(/\^\^/g," ").replace(/\^/g," ")},scopeRules:function(a,b,c){var d="";return Array.prototype.forEach.call(a,function(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSelector(a.selectorText,b,c,this.strictStyling)+" {\n	",d+=this.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeRules(a.cssRules,b,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},scopeSelector:function(a,b,c,d){var e=[],f=a.split(",");return f.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b,c)&&(a=d&&!a.match(y)?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},this),e.join(", ")},selectorNeedsScoping:function(a,b,c){var d=this.makeScopeMatcher(b,c);return!a.match(d)},makeScopeMatcher:function(a,b){var c=b?"\\[is=['\"]?"+a+"['\"]?\\]":a;return new RegExp("^("+c+")"+v,"m")},applySimpleSelectorScope:function(a,b,c){var d=c?"[is="+b+"]":b;return a.match(z)?(a=a.replace(y,d),a.replace(z,d+" ")):d+" "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().replace(z,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){return a.replace(w,t).replace(x,t)},propertiesFromRule:function(a){return a.style.cssText}},j=/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,k=/([^{]*)({[\s\S]*?})/gim,l=/(.*)((?:\*)|(?:\:scope))(.*)/,m=/^[.\[:]/,n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,o=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,p=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,r=/::(x-[^\s{,(]*)/gim,s=/::part\(([^)]*)\)/gim,t="-shadowcsshost",u=new RegExp("("+t+")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)","gim"),v="([>\\s~+[.,{:][\\s\\S]*)?$",w=/@host/gim,x=/\:host/gim,y=t+"-no-combinator",z=new RegExp(t,"gim");if(window.ShadowDOMPolyfill){f("style { display: none !important; }\n");var A=document.querySelector("head");A.insertBefore(g(),A.childNodes[0])}a.ShadowCSS=i}(window.Platform)}
\ No newline at end of file
+if(!HTMLElement.prototype.createShadowRoot||window.__forceShadowDomPolyfill){!function(){Element.prototype.webkitCreateShadowRoot&&(Element.prototype.webkitCreateShadowRoot=function(){return window.ShadowDOMPolyfill.wrapIfNeeded(this).createShadowRoot()})}(),function(a){"use strict";function b(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={};if(Object.observe(c,a),c.id=1,c.id=2,delete c.id,Object.deliverChangeRecords(a),3!==b.length)return!1;if("new"==b[0].type&&"updated"==b[1].type&&"deleted"==b[2].type)L="new",M="updated",N="reconfigured",O="deleted";else if("add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type)return console.error("Unexpected change record names for Object.observe. Using dirty-checking instead"),!1;return Object.unobserve(c,a),c=[0],Array.observe(c,a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),2!=b.length?!1:b[0].type!=P||b[1].type!=P?!1:(Array.unobserve(c,a),!0)}function c(){if(a.document&&"securityPolicy"in a.document&&!a.document.securityPolicy.allowsEval)return!1;try{var b=new Function("","return true;");return b()}catch(c){return!1}}function d(a){return+a===a>>>0}function e(a){return+a}function f(a){return a===Object(a)}function g(a,b){return a===b?0!==a||1/a===1/b:S(a)&&S(b)?!0:a!==a&&b!==b}function h(a){return"string"!=typeof a?!1:(a=a.trim(),""==a?!0:"."==a[0]?!1:$.test(a))}function i(a,b){if(b!==_)throw Error("Use Path.get to retrieve path objects");return""==a.trim()?this:d(a)?(this.push(a),this):(a.split(/\s*\.\s*/).filter(function(a){return a}).forEach(function(a){this.push(a)},this),void(R&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn())))}function j(a){if(a instanceof i)return a;null==a&&(a=""),"string"!=typeof a&&(a=String(a));var b=ab[a];if(b)return b;if(!h(a))return bb;var b=new i(a,_);return ab[a]=b,b}function k(b){for(var c=0;db>c&&b.check_();)c++;return a.testingExposeCycleCount&&(a.dirtyCheckCycleCount=c),c>0}function l(a){for(var b in a)return!1;return!0}function m(a){return l(a.added)&&l(a.removed)&&l(a.changed)}function n(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function o(){if(!eb.length)return!1;for(var a=0;a<eb.length;a++)eb[a]();return eb.length=0,!0}function p(){function a(a){b&&b.state_===kb&&!d&&b.check_(a)}var b,c,d=!1,e=!0;return{open:function(c){if(b)throw Error("ObservedObject in use");e||Object.deliverChangeRecords(a),b=c,e=!1},observe:function(b,d){c=b,d?Array.observe(c,a):Object.observe(c,a)},deliver:function(b){d=b,Object.deliverChangeRecords(a),d=!1},close:function(){b=void 0,Object.unobserve(c,a),gb.push(this)}}}function q(a,b,c){var d=gb.pop()||p();return d.open(a),d.observe(b,c),d}function r(){function a(b){if(f(b)){var c=i.indexOf(b);c>=0?(i[c]=void 0,h.push(b)):h.indexOf(b)<0&&(h.push(b),Object.observe(b,d)),a(Object.getPrototypeOf(b))}}function b(){if(k=!1,j){var b=i===hb?[]:i;i=h,h=b;var c;for(var f in e)c=e[f],c&&c.state_==kb&&c.iterateObjects_(a);for(var g=0;g<i.length;g++){var l=i[g];l&&Object.unobserve(l,d)}i.length=0}}function c(){k||(j=!0,k=!0,fb(b))}function d(){var a;for(var b in e)a=e[b],a&&a.state_==kb&&a.check_();c()}var e=[],g=0,h=[],i=hb,j=!1,k=!1,l={object:void 0,objects:h,open:function(b){e[b.id_]=b,g++,b.iterateObjects_(a)},close:function(a){if(e[a.id_]=void 0,g--,g)return void c();j=!1;for(var b=0;b<h.length;b++)Object.unobserve(h[b],d),t.unobservedCount++;e.length=0,h.length=0,ib.push(this)},reset:c};return l}function s(a,b){return cb&&cb.object===b||(cb=ib.pop()||r(),cb.object=b),cb.open(a),cb}function t(){this.state_=jb,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=nb++}function u(a){t._allObserversCount++,pb&&ob.push(a)}function v(){t._allObserversCount--}function w(a){t.call(this),this.value_=a,this.oldObject_=void 0}function x(a){if(!Array.isArray(a))throw Error("Provided object is not an Array");w.call(this,a)}function y(a,b){t.call(this),this.object_=a,this.path_=b instanceof i?b:j(b),this.directObserver_=void 0}function z(){t.call(this),this.value_=[],this.directObserver_=void 0,this.observed_=[]}function A(a){return a}function B(a,b,c,d){this.callback_=void 0,this.target_=void 0,this.value_=void 0,this.observable_=a,this.getValueFn_=b||A,this.setValueFn_=c||A,this.dontPassThroughSet_=d}function C(a,b){if("function"==typeof Object.observe){var c=Object.getNotifier(a);return function(d,e){var f={object:a,type:d,name:b};2===arguments.length&&(f.oldValue=e),c.notify(f)}}}function D(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];tb[g.type]?(g.name in c||(c[g.name]=g.oldValue),g.type!=M&&(g.type!=L?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}function E(a,b,c){return{index:a,removed:b,addedCount:c}}function F(){}function G(a,b,c,d,e,f){return yb.calcSplices(a,b,c,d,e,f)}function H(a,b,c,d){return c>b||a>d?-1:b==c||d==a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function I(a,b,c,d){for(var e=E(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=H(e.index,e.index+e.removed.length,i.index,i.index+i.addedCount);if(j>=0){a.splice(h,1),h--,g-=i.addedCount-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.removed.length-j;if(e.addedCount||k){var c=i.removed;if(e.index<i.index){var l=e.removed.slice(0,i.index-e.index);Array.prototype.push.apply(l,c),c=l}if(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i.addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index&&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splice(h,0,e),h++;var n=e.addedCount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)}function J(a,b){for(var c=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case P:I(c,g.index,g.removed.slice(),g.addedCount);break;case L:case M:case O:if(!d(g.name))continue;var h=e(g.name);if(0>h)continue;I(c,h,[g.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(g))}}return c}function K(a,b){var c=[];return J(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?void(b.removed[0]!==a[b.index]&&c.push(b)):void(c=c.concat(G(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)))}),c}var L="add",M="update",N="reconfigure",O="delete",P="splice",Q=b(),R=c(),S=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},T="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},U="[$_a-zA-Z]",V="[$_a-zA-Z0-9]",W=U+"+"+V+"*",X="(?:[0-9]|[1-9]+[0-9]+)",Y="(?:"+W+"|"+X+")",Z="(?:"+Y+")(?:\\s*\\.\\s*"+Y+")*",$=new RegExp("^"+Z+"$"),_={},ab={};i.get=j,i.prototype=T({__proto__:[],valid:!0,toString:function(){return this.join(".")},getValueFrom:function(a){for(var b=0;b<this.length;b++){if(null==a)return;a=a[this[b]]}return a},iterateObjects:function(a,b){for(var c=0;c<this.length;c++){if(c&&(a=a[this[c-1]]),!a)return;b(a)}},compiledGetValueFromFn:function(){var a=this.map(function(a){return d(a)?'["'+a+'"]':"."+a}),b="",c="obj";b+="if (obj != null";for(var e=0;e<this.length-1;e++){{this[e]}c+=a[e],b+=" &&\n     "+c+" != null"}return b+=")\n",c+=a[e],b+="  return "+c+";\nelse\n  return undefined;",new Function("obj",b)},setValueFrom:function(a,b){if(!this.length)return!1;for(var c=0;c<this.length-1;c++){if(!f(a))return!1;a=a[this[c]]}return f(a)?(a[this[c]]=b,!0):!1}});var bb=new i("",_);bb.valid=!1,bb.getValueFrom=bb.setValueFrom=function(){};var cb,db=1e3,eb=[],fb=Q?function(){var a={pingPong:!0},b=!1;return Object.observe(a,function(){o(),b=!1}),function(c){eb.push(c),b||(b=!0,a.pingPong=!a.pingPong)}}():function(){return function(a){eb.push(a)}}(),gb=[],hb=[],ib=[],jb=0,kb=1,lb=2,mb=3,nb=1;t.prototype={open:function(a,b){if(this.state_!=jb)throw Error("Observer has already been opened.");return u(this),this.callback_=a,this.target_=b,this.state_=kb,this.connect_(),this.value_},close:function(){this.state_==kb&&(v(this),this.state_=lb,this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0)},deliver:function(){this.state_==kb&&k(this)},report_:function(a){try{this.callback_.apply(this.target_,a)}catch(b){t._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var ob,pb=!Q;t._allObserversCount=0,pb&&(ob=[]);var qb=!1,rb="function"==typeof Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=function(){if(!qb){if(rb)return void Object.deliverAllChangeRecords();if(pb){qb=!0;var b,c,d=0;do{d++,c=ob,ob=[],b=!1;for(var e=0;e<c.length;e++){var f=c[e];f.state_==kb&&(f.check_()&&(b=!0),ob.push(f))}o()&&(b=!0)}while(db>d&&b);a.testingExposeCycleCount&&(a.dirtyCheckCycleCount=d),qb=!1}}},pb&&(a.Platform.clearObservers=function(){ob=[]}),w.prototype=T({__proto__:t.prototype,arrayObserve:!1,connect_:function(){Q?this.directObserver_=q(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(a){var b=Array.isArray(a)?[]:{};for(var c in a)b[c]=a[c];return Array.isArray(a)&&(b.length=a.length),b},check_:function(a){var b,c;if(Q){if(!a)return!1;c={},b=D(this.value_,a,c)}else c=this.oldObject_,b=n(this.value_,this.oldObject_);return m(b)?!1:(Q||(this.oldObject_=this.copyObject(this.value_)),this.report_([b.added||{},b.removed||{},b.changed||{},function(a){return c[a]}]),!0)},disconnect_:function(){Q?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==kb&&(Q?this.directObserver_.deliver(!1):k(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}}),x.prototype=T({__proto__:w.prototype,arrayObserve:!0,copyObject:function(a){return a.slice()},check_:function(a){var b;if(Q){if(!a)return!1;b=K(this.value_,a)}else b=G(this.value_,0,this.value_.length,this.oldObject_,0,this.oldObject_.length);return b&&b.length?(Q||(this.oldObject_=this.copyObject(this.value_)),this.report_([b]),!0):!1}}),x.applySplices=function(a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.length],e=c.index;e<c.index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.apply(a,d)})},y.prototype=T({__proto__:t.prototype,connect_:function(){Q&&(this.directObserver_=s(this,this.object_)),this.check_(void 0,!0)},disconnect_:function(){this.value_=void 0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},iterateObjects_:function(a){this.path_.iterateObjects(this.object_,a)},check_:function(a,b){var c=this.value_;return this.value_=this.path_.getValueFrom(this.object_),b||g(this.value_,c)?!1:(this.report_([this.value_,c]),!0)},setValue:function(a){this.path_&&this.path_.setValueFrom(this.object_,a)}});var sb={};z.prototype=T({__proto__:t.prototype,connect_:function(){if(this.check_(void 0,!0),Q){for(var a,b=!1,c=0;c<this.observed_.length;c+=2)if(a=this.observed_[c],a!==sb){b=!0;break}return this.directObserver_?b?void this.directObserver_.reset():(this.directObserver_.close(),void(this.directObserver_=void 0)):void(b&&(this.directObserver_=s(this,a)))}},closeObservers_:function(){for(var a=0;a<this.observed_.length;a+=2)this.observed_[a]===sb&&this.observed_[a+1].close();this.observed_.length=0},disconnect_:function(){this.value_=void 0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0),this.closeObservers_()},addPath:function(a,b){if(this.state_!=jb&&this.state_!=mb)throw Error("Cannot add paths once started.");this.observed_.push(a,b instanceof i?b:j(b))},addObserver:function(a){if(this.state_!=jb&&this.state_!=mb)throw Error("Cannot add observers once started.");a.open(this.deliver,this),this.observed_.push(sb,a)},startReset:function(){if(this.state_!=kb)throw Error("Can only reset while open");this.state_=mb,this.closeObservers_()},finishReset:function(){if(this.state_!=mb)throw Error("Can only finishReset after startReset");return this.state_=kb,this.connect_(),this.value_},iterateObjects_:function(a){for(var b,c=0;c<this.observed_.length;c+=2)b=this.observed_[c],b!==sb&&this.observed_[c+1].iterateObjects(b,a)},check_:function(a,b){for(var c,d=0;d<this.observed_.length;d+=2){var e=this.observed_[d+1],f=this.observed_[d],h=f===sb?e.discardChanges():e.getValueFrom(f);b?this.value_[d/2]=h:g(h,this.value_[d/2])||(c=c||[],c[d/2]=this.value_[d/2],this.value_[d/2]=h)}return c?(this.report_([this.value_,c,this.observed_]),!0):!1}}),B.prototype={open:function(a,b){return this.callback_=a,this.target_=b,this.value_=this.getValueFn_(this.observable_.open(this.observedCallback_,this)),this.value_},observedCallback_:function(a){if(a=this.getValueFn_(a),!g(a,this.value_)){var b=this.value_;this.value_=a,this.callback_.call(this.target_,this.value_,b)}},discardChanges:function(){return this.value_=this.getValueFn_(this.observable_.discardChanges()),this.value_},deliver:function(){return this.observable_.deliver()},setValue:function(a){return a=this.setValueFn_(a),!this.dontPassThroughSet_&&this.observable_.setValue?this.observable_.setValue(a):void 0},close:function(){this.observable_&&this.observable_.close(),this.callback_=void 0,this.target_=void 0,this.observable_=void 0,this.value_=void 0,this.getValueFn_=void 0,this.setValueFn_=void 0}};var tb={};tb[L]=!0,tb[M]=!0,tb[O]=!0,t.defineComputedProperty=function(a,b,c){var d=C(a,b),e=c.open(function(a,b){e=a,d&&d(M,b)});return Object.defineProperty(a,b,{get:function(){return c.deliver(),e},set:function(a){return c.setValue(a),a},configurable:!0}),{close:function(){c.close(),Object.defineProperty(a,b,{value:e,writable:!0,configurable:!0})}}};var ub=0,vb=1,wb=2,xb=3;F.prototype={calcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g==d?e.push(ub):(e.push(vb),d=g),b--,c--):f==h?(e.push(xb),b--,d=h):(e.push(wb),c--,d=i)}else e.push(xb),b--;else e.push(wb),c--;return e.reverse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,c-b==0&&f-e==0)return[];if(b==c){for(var j=E(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[E(b,[],c-b)];for(var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case ub:j&&(l.push(j),j=void 0),m++,n++;break;case vb:j||(j=E(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case wb:j||(j=E(m,[],0)),j.addedCount++,m++;break;case xb:j||(j=E(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var yb=new F;a.Observer=t,a.Observer.runEOM_=fb,a.Observer.hasObjectObserve=Q,a.ArrayObserver=x,a.ArrayObserver.calculateSplices=function(a,b){return yb.calculateSplices(a,b)},a.ArraySplice=F,a.ObjectObserver=w,a.PathObserver=y,a.CompoundObserver=z,a.Path=i,a.ObserverTransform=B,a.Observer.changeRecordTypes={add:L,update:M,reconfigure:N,"delete":O,splice:P}}("undefined"!=typeof global&&global&&"undefined"!=typeof module&&module?global:this||window),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMap=c}(),window.ShadowDOMPolyfill={},function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return L(b).forEach(function(c){K(a,c,M(b,c))}),a}function d(a,b){return L(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}K(a,c,M(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a),c=E.get(b);if(c)return c;var d=f(b),e=t(d);return q(b,e,a),e}function g(a,b){o(a,b,!0)}function h(a,b){o(b,a,!1)}function i(a){return/^on[a-z]+$/.test(a)}function j(a){return/^\w[a-zA-Z_0-9]*$/.test(a)}function k(a){return H&&j(a)?new Function("return this.impl."+a):function(){return this.impl[a]}}function l(a){return H&&j(a)?new Function("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){return H&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):function(){return this.impl[a].apply(this.impl,arguments)}}function n(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return O}}function o(b,c,d){for(var e=L(b),f=0;f<e.length;f++){var g=e[f];if("polymerBlackList_"!==g&&!(g in c||b.polymerBlackList_&&b.polymerBlackList_[g])){N&&b.__lookupGetter__(g);var h,j,o=n(b,g);if(d&&"function"==typeof o.value)c[g]=m(g);else{var p=i(g);h=p?a.getEventHandlerGetter(g):k(g),(o.writable||o.set)&&(j=p?a.getEventHandlerSetter(g):l(g)),K(c,g,{get:h,set:j,configurable:o.configurable,enumerable:o.enumerable})}}}}function p(a,b,c){var e=a.prototype;q(e,b,c),d(b,a)}function q(a,c,d){var e=c.prototype;b(void 0===E.get(a)),E.set(a,c),F.set(e,a),g(a,e),d&&h(e,d),K(e,"constructor",{value:c,configurable:!0,enumerable:!1,writable:!0})}function r(a,b){return E.get(b.prototype)===a}function s(a){var b=Object.getPrototypeOf(a),c=f(b),d=t(c);return q(b,d,a),d}function t(a){function b(b){a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}function u(a){return a instanceof G.EventTarget||a instanceof G.Event||a instanceof G.Range||a instanceof G.DOMImplementation||a instanceof G.CanvasRenderingContext2D||G.WebGLRenderingContext&&a instanceof G.WebGLRenderingContext}function v(a){return Q&&a instanceof Q||a instanceof S||a instanceof R||a instanceof T||a instanceof U||a instanceof P||a instanceof V||W&&a instanceof W||X&&a instanceof X}function w(a){return null===a?null:(b(v(a)),a.polymerWrapper_||(a.polymerWrapper_=new(f(a))(a)))}function x(a){return null===a?null:(b(u(a)),a.impl)}function y(a){return a&&u(a)?x(a):a}function z(a){return a&&!u(a)?w(a):a}function A(a,c){null!==c&&(b(v(a)),b(void 0===c||u(c)),a.polymerWrapper_=c)}function B(a,b,c){K(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function C(a,b){B(a,b,function(){return w(this.impl[b])})}function D(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=z(this);return a[b].apply(a,arguments)}})})}var E=new WeakMap,F=new WeakMap,G=Object.create(null),H=!("securityPolicy"in document)||document.securityPolicy.allowsEval;if(H)try{var I=new Function("","return true;");H=I()}catch(J){H=!1}var K=Object.defineProperty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor;L(window);var N=/Firefox/.test(navigator.userAgent),O={get:function(){},set:function(){},configurable:!0,enumerable:!0},P=window.DOMImplementation,Q=window.EventTarget,R=window.Event,S=window.Node,T=window.Window,U=window.Range,V=window.CanvasRenderingContext2D,W=window.WebGLRenderingContext,X=window.SVGElementInstance;a.assert=b,a.constructorTable=E,a.defineGetter=B,a.defineWrapGetter=C,a.forwardMethodsToWrapper=D,a.isWrapper=u,a.isWrapperFor=r,a.mixin=c,a.nativePrototypeTable=F,a.oneOf=e,a.registerObject=s,a.registerWrapper=p,a.rewrap=A,a.unwrap=x,a.unwrapIfNeeded=y,a.wrap=w,a.wrapIfNeeded=z,a.wrappers=G}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b<a.length;b++)a[b]()}function c(a){f.push(a),g||(g=!0,d(b,0))}var d,e=window.MutationObserver,f=[],g=!1;if(e){var h=1,i=new e(b),j=document.createTextNode(h);i.observe(j,{characterData:!0}),d=function(){h=(h+1)%2,j.data=h}}else d=window.setImmediate||window.setTimeout;a.setEndOfMicrotask=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){p||(k(c),p=!0)}function c(){p=!1;do for(var a=o.slice(),b=!1,c=0;c<a.length;c++){var d=a[c],e=d.takeRecords();f(d),e.length&&(d.callback_(e,d),b=!0)}while(b)}function d(a,b){this.type=a,this.target=b,this.addedNodes=new m.NodeList,this.removedNodes=new m.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function e(a,b){for(;a;a=a.parentNode){var c=n.get(a);if(c)for(var d=0;d<c.length;d++){var e=c[d];e.options.subtree&&e.addTransientObserver(b)}}}function f(a){for(var b=0;b<a.nodes_.length;b++){var c=a.nodes_[b],d=n.get(c);if(!d)return;for(var e=0;e<d.length;e++){var f=d[e];f.observer===a&&f.removeTransientObservers()}}}function g(a,c,e){for(var f=Object.create(null),g=Object.create(null),h=a;h;h=h.parentNode){var i=n.get(h);if(i)for(var j=0;j<i.length;j++){var k=i[j],l=k.options;if((h===a||l.subtree)&&!("attributes"===c&&!l.attributes||"attributes"===c&&l.attributeFilter&&(null!==e.namespace||-1===l.attributeFilter.indexOf(e.name))||"characterData"===c&&!l.characterData||"childList"===c&&!l.childList)){var m=k.observer;f[m.uid_]=m,("attributes"===c&&l.attributeOldValue||"characterData"===c&&l.characterDataOldValue)&&(g[m.uid_]=e.oldValue)}}}var o=!1;for(var p in f){var m=f[p],q=new d(c,a);"name"in e&&"namespace"in e&&(q.attributeName=e.name,q.attributeNamespace=e.namespace),e.addedNodes&&(q.addedNodes=e.addedNodes),e.removedNodes&&(q.removedNodes=e.removedNodes),e.previousSibling&&(q.previousSibling=e.previousSibling),e.nextSibling&&(q.nextSibling=e.nextSibling),void 0!==g[p]&&(q.oldValue=g[p]),m.records_.push(q),o=!0}o&&b()}function h(a){if(this.childList=!!a.childList,this.subtree=!!a.subtree,this.attributes="attributes"in a||!("attributeOldValue"in a||"attributeFilter"in a)?!!a.attributes:!0,this.characterData="characterDataOldValue"in a&&!("characterData"in a)?!0:!!a.characterData,!this.attributes&&(a.attributeOldValue||"attributeFilter"in a)||!this.characterData&&a.characterDataOldValue)throw new TypeError;if(this.characterData=!!a.characterData,this.attributeOldValue=!!a.attributeOldValue,this.characterDataOldValue=!!a.characterDataOldValue,"attributeFilter"in a){if(null==a.attributeFilter||"object"!=typeof a.attributeFilter)throw new TypeError;this.attributeFilter=q.call(a.attributeFilter)}else this.attributeFilter=null}function i(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++r,o.push(this)}function j(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var k=a.setEndOfMicrotask,l=a.wrapIfNeeded,m=a.wrappers,n=new WeakMap,o=[],p=!1,q=Array.prototype.slice,r=0;i.prototype={observe:function(a,b){a=l(a);var c,d=new h(b),e=n.get(a);e||n.set(a,e=[]);for(var f=0;f<e.length;f++)e[f].observer===this&&(c=e[f],c.removeTransientObservers(),c.options=d);c||(c=new j(this,a,d),e.push(c),this.nodes_.push(a))},disconnect:function(){this.nodes_.forEach(function(a){for(var b=n.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}},j.prototype={addTransientObserver:function(a){if(a!==this.target){this.transientObservedNodes.push(a);var b=n.get(a);b||n.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[];for(var b=0;b<a.length;b++)for(var c=a[b],d=n.get(c),e=0;e<d.length;e++)if(d[e]===this){d.splice(e,1);break}}},a.enqueueMutation=g,a.registerTransientObservers=e,a.wrappers.MutationObserver=i,a.wrappers.MutationRecord=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a instanceof Q.ShadowRoot}function c(a){var b=a.localName;return"content"===b||"shadow"===b}function d(a){return!!a.shadowRoot}function e(a){var b;return a.parentNode||(b=a.defaultView)&&P(b)||null}function f(f,g,h){if(h.length)return h.shift();if(b(f))return j(f)||f.host;var i=a.eventParentsTable.get(f);if(i){for(var k=1;k<i.length;k++)h[k-1]=i[k];return i[0]}if(g&&c(f)){var l=f.parentNode;if(l&&d(l))for(var m=a.getShadowTrees(l),n=j(g),k=0;k<m.length;k++)if(m[k].contains(n))return n}return e(f)}function g(a){for(var d=[],e=a,g=[],i=[];e;){var j=null;if(c(e)){j=h(d);var k=d[d.length-1]||e;d.push(k)}else d.length||d.push(e);var l=d[d.length-1];g.push({target:l,currentTarget:e}),b(e)&&d.pop(),e=f(e,j,i)}return g}function h(a){for(var b=a.length-1;b>=0;b--)if(!c(a[b]))return a[b];return null}function i(a,d){for(var e=[];a;){for(var g=[],i=d,j=void 0;i;){var l=null;if(g.length){if(c(i)&&(l=h(g),k(j))){var n=g[g.length-1];g.push(n)}}else g.push(i);if(m(i,a))return g[g.length-1];b(i)&&g.pop(),j=i,i=f(i,l,e)}a=b(a)?a.host:a.parentNode}}function j(b){return a.insertionParentTable.get(b)}function k(a){return j(a)}function l(a){for(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a)===l(b)}function n(a,b){return a===b?!0:a instanceof Q.ShadowRoot?n(l(a.host),b):!1}function o(a){return S.get(a)?void 0:(S.set(a,!0),p(P(a),P(a.target)))}function p(b,c){if(T.get(b))throw new Error("InvalidStateError");T.set(b,!0),a.renderAllPending();var d=g(c);return"load"===b.type&&2===d.length&&d[0].target instanceof Q.Document&&d.shift(),_.set(b,d),q(b,d)&&r(b,d)&&s(b,d),X.set(b,v.NONE),V.delete(b,null),T.delete(b),b.defaultPrevented}function q(a,b){for(var c,d=b.length-1;d>0;d--){var e=b[d].target,f=b[d].currentTarget;if(e!==f&&(c=v.CAPTURING_PHASE,!t(b[d],a,c)))return!1}return!0}function r(a,b){var c=v.AT_TARGET;return t(b[0],a,c)}function s(a,b){for(var c,d=a.bubbles,e=1;e<b.length;e++){var f=b[e].target,g=b[e].currentTarget;if(f===g)c=v.AT_TARGET;else{if(!d||Z.get(a))continue;c=v.BUBBLING_PHASE}if(!t(b[e],a,c))return}}function t(a,b,c){var d=a.target,e=a.currentTarget,f=R.get(e);if(!f)return!0;if("relatedTarget"in b){var g=O(b);if(g.relatedTarget){var h=P(g.relatedTarget),j=i(e,h);if(j===d)return!0;W.set(b,j)}}X.set(b,c);var k=b.type,l=!1;U.set(b,d),V.set(b,e);for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else if(!(n.type!==k||!n.capture&&c===v.CAPTURING_PHASE||n.capture&&c===v.BUBBLING_PHASE))try{if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),Z.get(b))return!1}catch(o){window.onerror?window.onerror(o.message):console.error(o,o.stack)}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p[m].removed||f.push(p[m])}return!Y.get(b)}function u(a,b,c){this.type=a,this.handler=b,this.capture=Boolean(c)}function v(a,b){return a instanceof ab?void(this.impl=a):P(z(ab,"Event",a,b))}function w(a){return a&&a.relatedTarget?Object.create(a,{relatedTarget:{value:O(a.relatedTarget)}}):a}function x(a,b,c){var d=window[a],e=function(b,c){return b instanceof d?void(this.impl=b):P(z(d,a,b,c))};if(e.prototype=Object.create(b.prototype),c&&M(e.prototype,c),d)try{N(d,e,new d("temp"))}catch(f){N(d,e,document.createEvent(a))}return e}function y(a,b){return function(){arguments[b]=O(arguments[b]);var c=O(this);c[a].apply(c,arguments)}}function z(a,b,c,d){if(jb)return new a(c,w(d));var e=O(document.createEvent(b)),f=ib[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a];"relatedTarget"===a&&(b=O(b)),g.push(b)}),e["init"+b].apply(e,g),e}function A(){v.call(this)}function B(a){return"function"==typeof a?!0:a&&a.handleEvent}function C(a){switch(a){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function D(a){this.impl=a}function E(a){return a instanceof Q.ShadowRoot&&(a=a.host),O(a)}function F(a,b){var c=R.get(a);if(c)for(var d=0;d<c.length;d++)if(!c[d].removed&&c[d].type===b)return!0;return!1}function G(a,b){for(var c=O(a);c;c=c.parentNode)if(F(P(c),b))return!0;return!1}function H(a){L(a,mb)}function I(b,c,d,e){a.renderAllPending();for(var f=P(nb.call(c.impl,d,e)),h=g(f,this),i=0;i<h.length;i++){var j=h[i];if(j.currentTarget===b)return j.target}return null}function J(a){return function(){var b=$.get(this);return b&&b[a]&&b[a].value||null}}function K(a){var b=a.slice(2);return function(c){var d=$.get(this);d||(d=Object.create(null),$.set(this,d));var e=d[a];if(e&&this.removeEventListener(b,e.wrapped,!1),"function"==typeof c){var f=function(b){var d=c.call(this,b);d===!1?b.preventDefault():"onbeforeunload"===a&&"string"==typeof d&&(b.returnValue=d)};this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f}}}}var L=a.forwardMethodsToWrapper,M=a.mixin,N=a.registerWrapper,O=a.unwrap,P=a.wrap,Q=a.wrappers,R=(new WeakMap,new WeakMap),S=new WeakMap,T=new WeakMap,U=new WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap,$=new WeakMap,_=new WeakMap;u.prototype={equals:function(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var ab=window.Event;ab.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},v.prototype={get target(){return U.get(this)},get currentTarget(){return V.get(this)},get eventPhase(){return X.get(this)},get path(){var a=new Q.NodeList,b=_.get(this);if(b){for(var c=0,d=b.length-1,e=l(V.get(this)),f=0;d>=f;f++){var g=b[f].currentTarget,h=l(g);n(e,h)&&(f!==d||g instanceof Q.Node)&&(a[c++]=g)}a.length=c}return a},stopPropagation:function(){Y.set(this,!0)},stopImmediatePropagation:function(){Y.set(this,!0),Z.set(this,!0)}},N(ab,v,document.createEvent("Event"));var bb=x("UIEvent",v),cb=x("CustomEvent",v),db={get relatedTarget(){return W.get(this)||P(O(this).relatedTarget)}},eb=M({initMouseEvent:y("initMouseEvent",14)},db),fb=M({initFocusEvent:y("initFocusEvent",5)},db),gb=x("MouseEvent",bb,eb),hb=x("FocusEvent",bb,fb),ib=Object.create(null),jb=function(){try{new window.FocusEvent("focus")}catch(a){return!1}return!0}();if(!jb){var kb=function(a,b,c){if(c){var d=ib[c];b=M(M({},d),b)}ib[a]=b};kb("Event",{bubbles:!1,cancelable:!1}),kb("CustomEvent",{detail:null},"Event"),kb("UIEvent",{view:null,detail:0},"Event"),kb("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),kb("FocusEvent",{relatedTarget:null},"UIEvent")}A.prototype=Object.create(v.prototype),M(A.prototype,{get returnValue(){return this.impl.returnValue},set returnValue(a){this.impl.returnValue=a}});var lb=window.EventTarget,mb=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prototype;mb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),D.prototype={addEventListener:function(a,b,c){if(B(b)&&!C(a)){var d=new u(a,b,c),e=R.get(this);if(e){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],R.set(this,e);e.push(d);var g=E(this);g.addEventListener_(a,o,!0)
+}},removeEventListener:function(a,b,c){c=Boolean(c);var d=R.get(this);if(d){for(var e=0,f=!1,g=0;g<d.length;g++)d[g].type===a&&d[g].capture===c&&(e++,d[g].handler===b&&(f=!0,d[g].remove()));if(f&&1===e){var h=E(this);h.removeEventListener_(a,o,!0)}}},dispatchEvent:function(b){var c=O(b),d=c.type;S.set(c,!1),a.renderAllPending();var e;G(this,d)||(e=function(){},this.addEventListener(d,e,!0));try{return O(this).dispatchEvent_(c)}finally{e&&this.removeEventListener(d,e,!0)}}},lb&&N(lb,D);var nb=document.elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=I,a.getEventHandlerGetter=J,a.getEventHandlerSetter=K,a.wrapEventTargetMethods=H,a.wrappers.BeforeUnloadEvent=A,a.wrappers.CustomEvent=cb,a.wrappers.Event=v,a.wrappers.EventTarget=D,a.wrappers.FocusEvent=hb,a.wrappers.MouseEvent=gb,a.wrappers.UIEvent=bb}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,{enumerable:!1})}function c(){this.length=0,b(this,"length")}function d(a){if(null==a)return a;for(var b=new c,d=0,e=a.length;e>d;d++)b[d]=f(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=function(){return d(this.impl[b].apply(this.impl,arguments))}}var f=a.wrap;c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){x(a instanceof u)}function c(a){var b=new w;return b[0]=a,b.length=1,b}function d(a,b,c){z(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){z(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);H=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;H=!1;for(var g=0;g<f.length;g++)f[g].previousSibling_=f[g-1]||d,f[g].nextSibling_=f[g+1]||e;return d&&(d.nextSibling_=f[0]),e&&(e.previousSibling_=f[f.length-1]),f}var f=c(a),i=a.parentNode;return i&&i.removeChild(a),a.parentNode_=b,a.previousSibling_=d,a.nextSibling_=e,d&&(d.nextSibling_=a),e&&(e.previousSibling_=a),f}function g(a){if(a instanceof DocumentFragment)return h(a);var b=c(a),e=a.parentNode;return e&&d(a,e,b),b}function h(a){for(var b=new w,c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b.length=c,e(a,b),b}function i(a){return a}function j(a){a.nodeIsInserted_()}function k(a){for(var b=0;b<a.length;b++)j(a[b])}function l(){}function m(){}function n(a,b){var c=a.nodeType===u.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c.adoptNode(b)}function o(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].ownerDocument)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function p(a,b){o(a,b);var c=b.length;if(1===c)return E(b[0]);for(var d=E(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild(E(b[e]));return d}function q(a){if(void 0!==a.firstChild_)for(var b=a.firstChild_;b;){var c=b;b=b.nextSibling_,c.parentNode_=c.previousSibling_=c.nextSibling_=void 0}a.firstChild_=a.lastChild_=void 0}function r(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){x(b.parentNode===a);var c=b.nextSibling,d=E(b),e=d.parentNode;e&&M.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=E(a),g=f.firstChild;g;)c=g.nextSibling,M.call(f,g),g=c}function s(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function t(a){for(var b,c=0;c<a.length;c++)b=a[c],b.parentNode.removeChild(b)}function u(a){x(a instanceof I),v.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var v=a.wrappers.EventTarget,w=a.wrappers.NodeList,x=a.assert,y=a.defineWrapGetter,z=a.enqueueMutation,A=a.isWrapper,B=a.mixin,C=a.registerTransientObservers,D=a.registerWrapper,E=a.unwrap,F=a.wrap,G=a.wrapIfNeeded,H=!1,I=window.Node,J=window.DocumentFragment,K=(I.prototype.appendChild,I.prototype.compareDocumentPosition),L=I.prototype.insertBefore,M=I.prototype.removeChild,N=I.prototype.replaceChild,O=/Trident/.test(navigator.userAgent),P=O?function(a,b){try{M.call(a,b)}catch(c){if(!(a instanceof J))throw c}}:function(a,b){M.call(a,b)};u.prototype=Object.create(v.prototype),B(u.prototype,{appendChild:function(a){return this.insertBefore(a,null)},insertBefore:function(a,c){b(a);var d;c?A(c)?d=E(c):(d=c,c=F(d)):(c=null,d=null),c&&x(c.parentNode===this);var e,h=c?c.previousSibling:this.lastChild,i=!this.invalidateShadowRenderer()&&!s(a);if(e=i?g(a):f(a,this,h,c),i)n(this,a),q(this),L.call(this.impl,E(a),d);else{h||(this.firstChild_=e[0]),c||(this.lastChild_=e[e.length-1]);var j=d?d.parentNode:this.impl;j?L.call(j,p(this,e),d):o(this,e)}return z(this,"childList",{addedNodes:e,nextSibling:c,previousSibling:h}),k(e),a},removeChild:function(a){if(b(a),a.parentNode!==this){for(var d=!1,e=(this.childNodes,this.firstChild);e;e=e.nextSibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundError")}var f=E(a),g=a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRenderer()){var i=this.firstChild,j=this.lastChild,k=f.parentNode;k&&P(k,f),i===a&&(this.firstChild_=g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previousSibling_=h),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else q(this),P(this.impl,f);return H||z(this,"childList",{removedNodes:c(a),nextSibling:g,previousSibling:h}),C(this,a),a},replaceChild:function(a,d){b(a);var e;if(A(d)?e=E(d):(e=d,d=F(e)),d.parentNode!==this)throw new Error("NotFoundError");var h,i=d.nextSibling,j=d.previousSibling,m=!this.invalidateShadowRenderer()&&!s(a);return m?h=g(a):(i===a&&(i=a.nextSibling),h=f(a,this,j,i)),m?(n(this,a),q(this),N.call(this.impl,E(a),e)):(this.firstChild===d&&(this.firstChild_=h[0]),this.lastChild===d&&(this.lastChild_=h[h.length-1]),d.previousSibling_=d.nextSibling_=d.parentNode_=void 0,e.parentNode&&N.call(e.parentNode,p(this,h),e)),z(this,"childList",{addedNodes:h,removedNodes:c(d),nextSibling:i,previousSibling:j}),l(d),k(h),d},nodeIsInserted_:function(){for(var a=this.firstChild;a;a=a.nextSibling)a.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:F(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:F(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:F(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:F(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:F(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==u.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstChild;b;b=b.nextSibling)b.nodeType!=u.COMMENT_NODE&&(a+=b.textContent);return a},set textContent(a){var b=i(this.childNodes);if(this.invalidateShadowRenderer()){if(r(this),""!==a){var c=this.impl.ownerDocument.createTextNode(a);this.appendChild(c)}}else q(this),this.impl.textContent=a;var d=i(this.childNodes);z(this,"childList",{addedNodes:d,removedNodes:b}),m(b),k(d)},get childNodes(){for(var a=new w,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){var b=F(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));return b},contains:function(a){if(!a)return!1;if(a=G(a),a===this)return!0;var b=a.parentNode;return b?this.contains(b):!1},compareDocumentPosition:function(a){return K.call(this.impl,E(a))},normalize:function(){for(var a,b,c=i(this.childNodes),d=[],e="",f=0;f<c.length;f++)b=c[f],b.nodeType===u.TEXT_NODE?a||b.data.length?a?(e+=b.data,d.push(b)):a=b:this.removeNode(b):(a&&d.length&&(a.data+=e,cleanUpNodes(d)),d=[],e="",a=null,b.childNodes.length&&b.normalize());a&&d.length&&(a.data+=e,t(d))}}),y(u,"ownerDocument"),D(I,u,document.createDocumentFragment()),delete u.prototype.querySelector,delete u.prototype.querySelectorAll,u.prototype=B(Object.create(v.prototype),u.prototype),a.nodeWasAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a.nodesWereRemoved=m,a.snapshotNodeList=i,a.wrappers.Node=u}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,c){for(var d,e=a.firstElementChild;e;){if(e.matches(c))return e;if(d=b(e,c))return d;e=e.nextElementSibling}return null}function c(a,b,d){for(var e=a.firstElementChild;e;)e.matches(b)&&(d[d.length++]=e),c(e,b,d),e=e.nextElementSibling;return d}var d={querySelector:function(a){return b(this,a)},querySelectorAll:function(a){return c(this,a,new NodeList)}},e={getElementsByTagName:function(a){return this.querySelectorAll(a)},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){if("*"===a)return this.getElementsByTagName(b);for(var c=new NodeList,d=this.getElementsByTagName(b),e=0,f=0;e<d.length;e++)d[e].namespaceURI===a&&(c[f++]=d[e]);return c.length=f,c}};a.GetElementsByInterface=e,a.SelectorsInterface=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.previousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h=window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a},get data(){return this.impl.data},set data(a){var b=this.impl.data;e(this,"characterData",{oldValue:b}),this.impl.data=a}}),f(b.prototype,c),g(h,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a>>>0}function c(a){d.call(this,a)}var d=a.wrappers.CharacterData,e=(a.enqueueMutation,a.mixin),f=a.registerWrapper,g=window.Text;c.prototype=Object.create(d.prototype),e(c.prototype,{splitText:function(a){a=b(a);var c=this.data;if(a>c.length)throw new Error("IndexSizeError");var d=c.slice(0,a),e=c.slice(a);this.data=d;var f=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(f,this.nextSibling),f}}),f(g,c,document.createTextNode("")),a.wrappers.Text=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){h.call(this,a)}function e(a,c,d){var e=d||c;Object.defineProperty(a,c,{get:function(){return this.impl[c]},set:function(a){this.impl[c]=a,b(this,e)},configurable:!0,enumerable:!0})}var f=a.ChildNodeInterface,g=a.GetElementsByInterface,h=a.wrappers.Node,i=a.ParentNodeInterface,j=a.SelectorsInterface,k=(a.addWrapNodeListMethod,a.enqueueMutation),l=a.mixin,m=(a.oneOf,a.registerWrapper),n=a.wrappers,o=window.Element,p=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(a){return o.prototype[a]}),q=p[0],r=o.prototype[q];d.prototype=Object.create(h.prototype),l(d.prototype,{createShadowRoot:function(){var b=new n.ShadowRoot(this);this.impl.polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){return this.impl.polymerShadowRoot_||null},setAttribute:function(a,d){var e=this.impl.getAttribute(a);this.impl.setAttribute(a,d),c(this,a,e),b(this,a)},removeAttribute:function(a){var d=this.impl.getAttribute(a);this.impl.removeAttribute(a),c(this,a,d),b(this,a)},matches:function(a){return r.call(this.impl,a)}}),p.forEach(function(a){"matches"!==a&&(d.prototype[a]=function(a){return this.matches(a)})}),o.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),e(d.prototype,"id"),e(d.prototype,"className","class"),l(d.prototype,f),l(d.prototype,g),l(d.prototype,i),l(d.prototype,j),m(o,d,document.createElementNS(null,"x")),a.matchesNames=p,a.wrappers.Element=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function c(a){return a.replace(y,b)}function d(a){return a.replace(z,b)}function e(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function f(a,b){switch(a.nodeType){case Node.ELEMENT_NODE:for(var e,f=a.tagName.toLowerCase(),h="<"+f,i=a.attributes,j=0;e=i[j];j++)h+=" "+e.name+'="'+c(e.value)+'"';return h+=">",A[f]?h:h+g(a)+"</"+f+">";case Node.TEXT_NODE:var k=a.data;return b&&B[b.localName]?k:d(k);case Node.COMMENT_NODE:return"<!--"+a.data+"-->";default:throw console.error(a),new Error("not implemented")}}function g(a){for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=f(c,a);return b}function h(a,b,c){var d=c||"div";a.textContent="";var e=w(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(x(f))}function i(a){o.call(this,a)}function j(a,b){var c=w(a.cloneNode(!1));c.innerHTML=b;for(var d,e=w(document.createDocumentFragment());d=c.firstChild;)e.appendChild(d);return x(e)}function k(b){return function(){return a.renderAllPending(),this.impl[b]}}function l(a){p(i,a,k(a))}function m(b){Object.defineProperty(i.prototype,b,{get:k(b),set:function(c){a.renderAllPending(),this.impl[b]=c},configurable:!0,enumerable:!0})}function n(b){Object.defineProperty(i.prototype,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var o=a.wrappers.Element,p=a.defineGetter,q=a.enqueueMutation,r=a.mixin,s=a.nodesWereAdded,t=a.nodesWereRemoved,u=a.registerWrapper,v=a.snapshotNodeList,w=a.unwrap,x=a.wrap,y=/[& "]/g,z=/[& <>]/g,A=e(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),B=e(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),C=/MSIE/.test(navigator.userAgent),D=window.HTMLElement;i.prototype=Object.create(o.prototype),r(i.prototype,{get innerHTML(){return g(this)},set innerHTML(a){if(C&&B[this.localName])return void(this.textContent=a);var b=v(this.childNodes);this.invalidateShadowRenderer()?h(this,a,this.tagName):this.impl.innerHTML=a;var c=v(this.childNodes);q(this,"childList",{addedNodes:c,removedNodes:b}),t(b),s(c)},get outerHTML(){return f(this,this.parentNode)},set outerHTML(a){var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=j(b,a);b.replaceChild(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowerCase()){case"beforebegin":c=this.parentNode,d=this;break;case"afterend":c=this.parentNode,d=this.nextSibling;break;case"afterbegin":c=this,d=this.firstChild;break;case"beforeend":c=this,d=null;break;default:return}var e=j(c,b);c.insertBefore(e,d)}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(l),["scrollLeft","scrollTop"].forEach(m),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(n),u(D,i,document.createElement("b")),a.wrappers.HTMLElement=i,a.getInnerHTML=g,a.setInnerHTML=h}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getContext.apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return this.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var e=f(document.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=m.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);m.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=j(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!n){var b=c(a);l.set(this,k(b))}}var e=a.wrappers.HTMLElement,f=a.getInnerHTML,g=a.mixin,h=a.registerWrapper,i=a.setInnerHTML,j=a.unwrap,k=a.wrap,l=new WeakMap,m=new WeakMap,n=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content(){return n?k(this.impl.content):l.get(this)},get innerHTML(){return f(this.content)},set innerHTML(a){i(this.content,a)}}),n&&h(n,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.");var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.registerObject,c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"title"),e=b(d),f=Object.getPrototypeOf(e.prototype).constructor;a.wrappers.SVGElement=f}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){m.call(this,a)}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.wrap,g=window.SVGUseElement,h="http://www.w3.org/2000/svg",i=f(document.createElementNS(h,"g")),j=document.createElementNS(h,"use"),k=i.constructor,l=Object.getPrototypeOf(k.prototype),m=l.constructor;b.prototype=Object.create(l),"instanceRoot"in j&&c(b.prototype,{get instanceRoot(){return f(e(this).instanceRoot)},get animatedInstanceRoot(){return f(e(this).animatedInstanceRoot)}}),d(g,b,j),a.wrappers.SVGUseElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.SVGElementInstance;g&&(b.prototype=Object.create(c.prototype),d(b.prototype,{get correspondingElement(){return f(this.impl.correspondingElement)},get correspondingUseElement(){return f(this.impl.correspondingUseElement)},get parentNode(){return f(this.impl.parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return f(this.impl.firstChild)},get lastChild(){return f(this.impl.lastChild)},get previousSibling(){return f(this.impl.previousSibling)},get nextSibling(){return f(this.impl.nextSibling)}}),e(g,b),a.wrappers.SVGElementInstance=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,arguments)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={get startContainer(){return f(this.impl.startContainer)},get endContainer(){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(this.impl.commonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b)},setEnd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this.impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e(a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extractContents:function(){return f(this.impl.extractContents())},cloneContents:function(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.insertNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},cloneRange:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNode(e(a))},toString:function(){return this.impl.toString()}},g.prototype.createContextualFragment&&(b.prototype.createContextualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(window.Range,b,document.createRange()),a.wrappers.Range=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(document.createDocumentFragment());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createComment(""));a.wrappers.Comment=h,a.wrappers.DocumentFragment=g}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=i(a.impl.ownerDocument.createDocumentFragment());c.call(this,b),g(b,this);var d=a.shadowRoot;k.set(this,d),j.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.getInnerHTML,f=a.mixin,g=a.rewrap,h=a.setInnerHTML,i=a.unwrap,j=new WeakMap,k=new WeakMap,l=/[ \t\n\r\f]/;b.prototype=Object.create(c.prototype),f(b.prototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return k.get(this)||null},get host(){return j.get(this)||null},invalidateShadowRenderer:function(){return j.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getElementById:function(a){return l.test(a)?null:this.querySelector('[id="'+a+'"]')}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a,c,e){var f=F(a),g=F(c),h=e?F(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.previousSibling_=e.previousSibling;else{a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var i=G(f.lastChild);i&&(i.nextSibling_=i.nextSibling)}f.insertBefore(g,h)}function d(a){var c=F(a),d=c.parentNode;if(d){var e=G(d);b(a),a.previousSibling&&(a.previousSibling.nextSibling_=a),a.nextSibling&&(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.lastChild_=a),e.firstChild===a&&(e.firstChild_=a),d.removeChild(c)}}function e(a,b){g(b).push(a),x(a,b);var c=I.get(a);c||I.set(a,c=[]),c.push(b)}function f(a){H.set(a,[])}function g(a){return H.get(a)}function h(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function i(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling)if(b(d)){if(c(d)===!1)return}else i(d,b,c)}function j(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a instanceof z))return!1;if("*"===c||c===a.localName)return!0;if(!L.test(c))return!1;if(":"===c[0]&&!M.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function k(){for(var a=0;a<O.length;a++)O[a].render();O=[]}function l(){y=null,k()}function m(a){var b=K.get(a);return b||(b=new q(a),K.set(a,b)),b}function n(a){for(;a;a=a.parentNode)if(a instanceof D)return a;return null}function o(a){return m(a.host)}function p(a){this.skip=!1,this.node=a,this.childNodes=[]}function q(a){this.host=a,this.dirty=!1,this.invalidateAttributes(),this.associateNode(a)}function r(a){return a instanceof A}function s(a){return a instanceof A}function t(a){return a instanceof B}function u(a){return a instanceof B}function v(a){return a.shadowRoot}function w(a){for(var b=[],c=a.shadowRoot;c;c=c.olderShadowRoot)b.push(c);return b}function x(a,b){J.set(a,b)}var y,z=a.wrappers.Element,A=a.wrappers.HTMLContentElement,B=a.wrappers.HTMLShadowElement,C=a.wrappers.Node,D=a.wrappers.ShadowRoot,E=(a.assert,a.mixin,a.oneOf),F=a.unwrap,G=a.wrap,H=new WeakMap,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=/^[*.:#[a-zA-Z_|]/,M=new RegExp("^:("+["link","visited","target","enabled","disabled","checked","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of-type","last-of-type","only-of-type"].join("|")+")"),N=E(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),O=[],P=new ArraySplice;P.equals=function(a,b){return F(a.node)===b},p.prototype={append:function(a){var b=new p(a);return this.childNodes.push(b),b},sync:function(a){if(!this.skip){for(var b=this.node,e=this.childNodes,f=h(F(b)),g=a||new WeakMap,i=P.calculateSplices(e,f),j=0,k=0,l=0,m=0;m<i.length;m++){for(var n=i[m];l<n.index;l++)k++,e[j++].sync(g);for(var o=n.removed.length,p=0;o>p;p++){var q=G(f[k++]);g.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&G(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),g.set(u,!0),t.sync(g)}l+=r}for(var m=l;m<e.length;m++)e[m].sync(g)}}},q.prototype={render:function(a){if(this.dirty){this.invalidateAttributes(),this.treeComposition();var b=this.host,c=b.shadowRoot;this.associateNode(b);for(var d=!e,e=a||new p(b),f=c.firstChild;f;f=f.nextSibling)this.renderNode(c,e,f,!1);d&&e.sync(),this.dirty=!1}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,O.push(this),y)return;y=window[N](l,0)}},renderNode:function(a,b,c,d){if(v(c)){b=b.append(c);var e=m(c);e.dirty=!0,e.render(b)}else r(c)?this.renderInsertionPoint(a,b,c,d):t(c)?this.renderShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:function(a,b,c,d){if(b=b.append(c),v(c)){var e=m(c);b.skip=!e.dirty,e.render(b)}else for(var f=c.firstChild;f;f=f.nextSibling)this.renderNode(a,b,f,d)},renderInsertionPoint:function(a,b,c,d){var e=g(c);if(e.length){this.associateNode(c);for(var f=0;f<e.length;f++){var h=e[f];r(h)&&d?this.renderInsertionPoint(a,b,h,d):this.renderAsAnyDomTree(a,b,h,d)}}else this.renderFallbackContent(a,b,c);this.associateNode(c.parentNode)},renderShadowInsertionPoint:function(a,b,c){var d=a.olderShadowRoot;if(d){x(d,c),this.associateNode(c.parentNode);for(var e=d.firstChild;e;e=e.nextSibling)this.renderNode(d,b,e,!0)}else this.renderFallbackContent(a,b,c)},renderFallbackContent:function(a,b,c){this.associateNode(c),this.associateNode(c.parentNode);for(var d=c.firstChild;d;d=d.nextSibling)this.renderAsAnyDomTree(a,b,d,!1)},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(a){if(a){var b=this.attributes;/\.\w+/.test(a)&&(b["class"]=!0),/#\w+/.test(a)&&(b.id=!0),a.replace(/\[\s*([^\s=\|~\]]+)/g,function(a,c){b[c]=!0})}},dependsOnAttribute:function(a){return this.attributes[a]},distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.updateDependentAttributes(a.getAttribute("select"));for(var d=0;d<b.length;d++){var g=b[d];void 0!==g&&j(g,a)&&(e(g,a),b[d]=void 0)}})},treeComposition:function(){for(var a=this.host,b=a.shadowRoot,c=[],d=a.firstChild;d;d=d.nextSibling)if(r(d)){var e=g(d);e&&e.length||(e=h(d)),c.push.apply(c,e)}else c.push(d);for(var f,j;b;){if(f=void 0,i(b,u,function(a){return f=a,!1}),j=f,this.distribute(b,c),j){var k=b.olderShadowRoot;if(k){b=k,x(b,j);continue}break}break}},associateNode:function(a){a.impl.polymerShadowRenderer_=this}},C.prototype.invalidateShadowRenderer=function(){var a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},A.prototype.getDistributedNodes=function(){return k(),g(this)},B.prototype.nodeIsInserted_=A.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var a,b=n(this);b&&(a=o(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a.eventParentsTable=I,a.getRendererForHost=m,a.getShadowTrees=w,a.insertionParentTable=J,a.renderAllPending=k,a.visual={insertBefore:c,remove:d}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);var i=function(a){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.prototype,{get form(){return h(g(this).form)
+}}),f(window[b],i,document.createElement(b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d=a.assert,e=a.mixin,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLSelectElement","HTMLTextAreaElement"];i.forEach(b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}{var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap;window.Selection}b.prototype={get anchorNode(){return f(this.impl.anchorNode)},get focusNode(){return f(this.impl.focusNode)},addRange:function(a){this.impl.addRange(d(a))},collapse:function(a,b){this.impl.collapse(e(a),b)},containsNode:function(a,b){return this.impl.containsNode(e(a),b)},extend:function(a,b){this.impl.extend(e(a),b)},getRangeAt:function(a){return f(this.impl.getRangeAt(a))},removeRange:function(a){this.impl.removeRange(d(a))},selectAllChildren:function(a){this.impl.selectAllChildren(e(a))},toString:function(){return this.impl.toString()}},c(window.Selection,b,window.getSelection()),a.wrappers.Selection=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){k.call(this,a)}function c(a){var c=document[a];b.prototype[a]=function(){return y(c.apply(this.impl,arguments))}}function d(a,b){B.call(b.impl,x(a)),e(a,b)}function e(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof o&&f(a,b);for(var c=a.firstChild;c;c=c.nextSibling)e(c,b)}function f(a,b){var c=a.olderShadowRoot;c&&b.adoptNode(c)}function g(a){this.impl=a}function h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return y(c.apply(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply(this.impl,arguments)}}var j=a.GetElementsByInterface,k=a.wrappers.Node,l=a.ParentNodeInterface,m=a.wrappers.Selection,n=a.SelectorsInterface,o=a.wrappers.ShadowRoot,p=a.defineWrapGetter,q=a.elementFromPoint,r=a.forwardMethodsToWrapper,s=a.matchesNames,t=a.mixin,u=a.registerWrapper,v=a.renderAllPending,w=a.rewrap,x=a.unwrap,y=a.wrap,z=a.wrapEventTargetMethods,A=(a.wrapNodeList,new WeakMap);b.prototype=Object.create(k.prototype),p(b,"documentElement"),p(b,"body"),p(b,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(c);var B=document.adoptNode,C=document.importNode,D=document.getSelection;if(t(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild(a),d(a,this),a},elementFromPoint:function(a,b){return q(this,this,a,b)},importNode:function(a,b){var c=y(C.call(this.impl,x(a),!1));if(b)for(var d=a.firstChild;d;d=d.nextSibling)c.appendChild(this.importNode(d,!0));return c},getSelection:function(){return v(),new m(D.call(x(this)))}}),document.registerElement){var E=document.registerElement;b.prototype.registerElement=function(b,c){function d(a){return a?void(this.impl=a):c.extends?document.createElement(c.extends,b):document.createElement(b)}var e=c.prototype;if(a.nativePrototypeTable.get(e))throw new Error("NotSupportedError");for(var f,g=Object.getPrototypeOf(e),h=[];g&&!(f=a.nativePrototypeTable.get(g));)h.push(g),g=Object.getPrototypeOf(g);if(!f)throw new Error("NotSupportedError");for(var i=Object.create(f),j=h.length-1;j>=0;j--)i=Object.create(i);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(i[a]=function(){y(this)instanceof d||w(this),b.apply(y(this),arguments)})});var k={prototype:i};c.extends&&(k.extends=c.extends),d.prototype=e,d.prototype.constructor=d,a.constructorTable.set(i,d),a.nativePrototypeTable.set(e,i);E.call(x(this),b,k);return d},r([window.HTMLDocument||window.Document],["registerElement"])}r([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"].concat(s)),r([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","elementFromPoint","getElementById","getSelection"]),t(b.prototype,j),t(b.prototype,l),t(b.prototype,n),t(b.prototype,{get implementation(){var a=A.get(this);return a?a:(a=new g(x(this).implementation),A.set(this,a),a)}}),u(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&u(window.HTMLDocument,b),z([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocument"),i(g,"hasFeature"),u(window.DOMImplementation,g),r([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.wrappers.Selection,e=a.mixin,f=a.registerWrapper,g=a.renderAllPending,h=a.unwrap,i=a.unwrapIfNeeded,j=a.wrap,k=window.Window,l=window.getComputedStyle,m=window.getSelection;b.prototype=Object.create(c.prototype),k.prototype.getComputedStyle=function(a,b){return j(this||window).getComputedStyle(i(a),b)},k.prototype.getSelection=function(){return j(this||window).getSelection()},delete window.getComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){k.prototype[a]=function(){var b=j(this||window);return b[a].apply(b,arguments)},delete window[a]}),e(b.prototype,{getComputedStyle:function(a,b){return g(),l.call(h(this),i(a),b)},getSelection:function(){return g(),new d(m.call(h(this)))}}),f(k,b),a.wrappers.Window=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",data:"HTMLDataElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",time:"HTMLTimeElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTextAreaElement",track:"HTMLTrackElement",title:"HTMLTitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElements=c}(window.ShadowDOMPolyfill),function(){{var a=window.ShadowDOMPolyfill;a.wrap}Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),window.wrap=window.ShadowDOMPolyfill.wrap,window.unwrap=window.ShadowDOMPolyfill.unwrap,HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot,window.dartExperimentalFixupGetTag=function(b){function c(a){if(a instanceof d)return"NodeList";if(a instanceof e)return"ShadowRoot";if(window.MutationRecord&&a instanceof MutationRecord)return"MutationRecord";if(window.MutationObserver&&a instanceof MutationObserver)return"MutationObserver";if(a instanceof HTMLTemplateElement)return"HTMLTemplateElement";var c=f(a);if(a!==c){var g=a.constructor;if(g===c.constructor){var h=g._ShadowDOMPolyfill$cacheTag_;return h||(h=Object.prototype.toString.call(c),h=h.substring(8,h.length-1),g._ShadowDOMPolyfill$cacheTag_=h),h}a=c}return b(a)}var d=a.wrappers.NodeList,e=a.wrappers.ShadowRoot,f=a.unwrapIfNeeded;return c}}();var Platform={};!function(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c.replace(m,"")),c}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=b.sheet.cssRules;return b.parentNode.removeChild(b),d}function e(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join("\n\n")}function f(a){a&&g().appendChild(document.createTextNode(a))}function g(){return v||(v=document.createElement("style"),v.setAttribute("ShadowCSSShim",""),v.shadowCssShim=!0),v}var h=(a.loader,{strictStyling:!1,registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d),g=this.registerDefinition(a,b,d);this.strictStyling&&this.applyScopeToContent(a,b);var h=this.stylesToShimmedCssText(g.rootStyles,g.scopeStyles,b,e);g.shimmedStyle=c(h),a&&(a.shimmedStyle=g.shimmedStyle);for(var i,j=0,k=g.rootStyles.length;k>j&&(i=g.rootStyles[j]);j++)i.parentNode.removeChild(i);f(h)},stylesToShimmedCssText:function(a,b,c,d){c=c||"",this.insertPolyfillDirectives(a),this.insertPolyfillRules(a);var e=this.shimAtHost(b,c,d)+this.shimScoping(b,c,d);return e+=this.extractPolyfillUnscopedRules(a)},registerDefinition:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=a?a.querySelectorAll("style"):[];e=e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return!f||a&&!a.querySelector("shadow")||(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},isTypeExtension:function(a){return a&&a.indexOf("-")<0},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b)},this))},insertPolyfillDirectives:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillDirectivesInCssText(a.textContent)},this)},insertPolyfillDirectivesInCssText:function(a){return a.replace(n,function(a,b){return b.slice(0,-2)+"{"})},insertPolyfillRules:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillRulesInCssText(a.textContent)},this)},insertPolyfillRulesInCssText:function(a){return a.replace(o,function(a,b){return b.slice(0,-1)})},extractPolyfillUnscopedRules:function(a){var b="";return a&&Array.prototype.forEach.call(a,function(a){b+=this.extractPolyfillUnscopedRulesFromCssText(a.textContent)+"\n\n"},this),b},extractPolyfillUnscopedRulesFromCssText:function(a){for(var b,c="";b=p.exec(a);)c+=b[1].slice(0,-1)+"\n\n";return c},shimAtHost:function(a,b,c){return a?this.convertAtHostStyles(a,b,c):void 0},convertAtHostStyles:function(a,c,f){var g=b(a),h=this;return g=g.replace(i,function(a,b){return h.scopeHostCss(b,c,f)}),g=e(this.findAtHostRules(d(g),this.makeScopeMatcher(c,f)))},scopeHostCss:function(a,b,c){var d=this;return a.replace(j,function(a,e,f){return d.scopeHostSelector(e,b,c)+" "+f+"\n	"})},scopeHostSelector:function(a,b,c){var d=[],e=a.split(","),f="[is="+b+"]";return e.forEach(function(a){a=a.trim(),a.match(k)?a=a.replace(k,c?f+"$1$3":b+"$1$3"):a.match(l)&&(a=c?f+a:b+a),d.push(a)},this),d.join(", ")},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertScopedStyles(a,b,c):void 0},convertScopedStyles:function(a,c,e){var f=b(a).replace(i,"");f=this.insertPolyfillHostInCssText(f),f=this.convertColonHost(f),f=this.convertColonAncestor(f),f=this.convertPseudos(f),f=this.convertParts(f),f=this.convertCombinators(f);var g=d(f);return c&&(f=this.scopeRules(g,c,e)),f},convertPseudos:function(a){return a.replace(q," [pseudo=$1]")},convertParts:function(a){return a.replace(r," [part=$1]")},convertColonHost:function(a){return this.convertColonRule(a,cssColonHostRe,this.colonHostPartReplacer)},convertColonAncestor:function(a){return this.convertColonRule(a,cssColonAncestorRe,this.colonAncestorPartReplacer)},convertColonRule:function(a,b,c){return a.replace(b,function(a,b,d,e){if(b=polyfillHostNoCombinator,d){for(var f,g=d.split(","),h=[],i=0,j=g.length;j>i&&(f=g[i]);i++)f=f.trim(),h.push(c(b,f,e));return h.join(",")}return b+e})},colonAncestorPartReplacer:function(a,b,c){return b.match(s)?this.colonHostPartReplacer(a,b,c):a+b+c+", "+b+" "+a+c},colonHostPartReplacer:function(a,b,c){return a+b.replace(s,"")+c},convertCombinators:function(a){return a.replace(/\^\^/g," ").replace(/\^/g," ")},scopeRules:function(a,b,c){var d="";return Array.prototype.forEach.call(a,function(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSelector(a.selectorText,b,c,this.strictStyling)+" {\n	",d+=this.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeRules(a.cssRules,b,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},scopeSelector:function(a,b,c,d){var e=[],f=a.split(",");return f.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b,c)&&(a=d&&!a.match(polyfillHostNoCombinator)?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},this),e.join(", ")},selectorNeedsScoping:function(a,b,c){var d=this.makeScopeMatcher(b,c);return!a.match(d)},makeScopeMatcher:function(a,b){var c=b?"\\[is=['\"]?"+a+"['\"]?\\]":a;return new RegExp("^("+c+")"+selectorReSuffix,"m")},applySimpleSelectorScope:function(a,b,c){var d=c?"[is="+b+"]":b;return a.match(polyfillHostRe)?(a=a.replace(polyfillHostNoCombinator,d),a.replace(polyfillHostRe,d+" ")):d+" "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().replace(polyfillHostRe,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){return a.replace(hostRe,s).replace(colonHostRe,s).replace(colonAncestorRe,t)},propertiesFromRule:function(a){return a.style.content&&!a.style.content.match(/['"]+/)?a.style.cssText.replace(/content:[^;]*;/g,"content: '"+a.style.content+"';"):a.style.cssText}}),i=/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,j=/([^{]*)({[\s\S]*?})/gim,k=/(.*)((?:\*)|(?:\:scope))(.*)/,l=/^[.\[:]/,m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,n=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,o=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,p=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,q=/::(x-[^\s{,(]*)/gim,r=/::part\(([^)]*)\)/gim,s="-shadowcsshost",t="-shadowcssancestor",u=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";cssColonHostRe=new RegExp("("+s+u,"gim"),cssColonAncestorRe=new RegExp("("+t+u,"gim"),selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$",hostRe=/@host/gim,colonHostRe=/\:host/gim,colonAncestorRe=/\:ancestor/gim,polyfillHostNoCombinator=s+"-no-combinator",polyfillHostRe=new RegExp(s,"gim"),polyfillAncestorRe=new RegExp(t,"gim");var v;if(window.ShadowDOMPolyfill){f("style { display: none !important; }\n");var w=wrap(document),x=w.querySelector("head");x.insertBefore(g(),x.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){window.HTMLImports&&!HTMLImports.useNative&&(HTMLImports.importer.preloadSelectors+=", link[rel=stylesheet]:not([nopolyfill])",HTMLImports.parser.parseGeneric=function(a){if(!a.shadowCssShim){var b=a;if(!a.hasAttribute("nopolyfill")){a.__resource?(b=a.ownerDocument.createElement("style"),b.textContent=Platform.loader.resolveUrlsInCssText(a.__resource,a.href),a.ownerDocument===w&&a.parentNode.removeChild(a)):Platform.loader.resolveUrlsInStyle(b);var c=[b];b.textContent=h.stylesToShimmedCssText(c,c),b.shadowCssShim=!0}b.parentNode!==x&&x.appendChild(b)}})})}a.ShadowCSS=h}(window.Platform)}
\ No newline at end of file
diff --git a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
index 4bc5a56..a5749ab 100644
--- a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
+++ b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
@@ -17,6 +17,10 @@
     }
   });
 
+  // ShadowCSS needs this:
+  window.wrap = window.ShadowDOMPolyfill.wrap;
+  window.unwrap = window.ShadowDOMPolyfill.unwrap;
+
   //TODO(sjmiles): review method alias with Arv
   HTMLElement.prototype.webkitCreateShadowRoot =
       HTMLElement.prototype.createShadowRoot;
diff --git a/pkg/shadow_dom/tool/build.sh b/pkg/shadow_dom/tool/build.sh
index f10e8c2..44d8ec7 100755
--- a/pkg/shadow_dom/tool/build.sh
+++ b/pkg/shadow_dom/tool/build.sh
@@ -41,4 +41,5 @@
 echo '*** Running grunt'
 grunt
 
-echo "*** Revision hash to use in commit message: $REVISIONS"
+echo "*** Saving REVISIONS file"
+echo "$REVISIONS" > ../REVISIONS
diff --git a/pkg/unittest/lib/html_config.dart b/pkg/unittest/lib/html_config.dart
index 4640305..dd760bd 100644
--- a/pkg/unittest/lib/html_config.dart
+++ b/pkg/unittest/lib/html_config.dart
@@ -30,7 +30,7 @@
     }
 
     if (uncaughtError != null) {
-        newBody.write('''<tr>
+      newBody.write('''<tr>
           <td>--</td>
           <td class="unittest-error">ERROR</td>
           <td>Uncaught error: $uncaughtError</td>
@@ -136,7 +136,7 @@
     // filtering, which we do with this meta-header.
     var meta = query('meta[name="dart.unittest"]');
     filterStacks = meta == null ? true :
-       !meta.content.contains('full-stack-traces');
+        !meta.content.contains('full-stack-traces');
     _installHandlers();
     window.postMessage('unittest-suite-wait-for-done', '*');
   }
diff --git a/pkg/unittest/lib/html_enhanced_config.dart b/pkg/unittest/lib/html_enhanced_config.dart
index 92759a8..f303f24 100644
--- a/pkg/unittest/lib/html_enhanced_config.dart
+++ b/pkg/unittest/lib/html_enhanced_config.dart
@@ -68,7 +68,7 @@
     final String _CSSID = '_unittestcss_';
 
     var cssElement = document.head.query('#${_CSSID}');
-    if (cssElement == null){
+    if (cssElement == null) {
       cssElement = new StyleElement();
       cssElement.id = _CSSID;
       document.head.append(cssElement);
@@ -148,8 +148,8 @@
       // order by group and sort numerically within each group
       var groupedBy = new LinkedHashMap<String, List<TestCase>>();
 
-      for (final t in results){
-        if (!groupedBy.containsKey(t.currentGroup)){
+      for (final t in results) {
+        if (!groupedBy.containsKey(t.currentGroup)) {
           groupedBy[t.currentGroup] = new List<TestCase>();
         }
 
@@ -174,9 +174,9 @@
 
         // replace everything but numbers and letters from the group name with
         // '_' so we can use in id and class properties.
-        var safeGroup = test_.currentGroup.replaceAll(nonAlphanumeric,'_');
+        var safeGroup = test_.currentGroup.replaceAll(nonAlphanumeric, '_');
 
-        if (test_.currentGroup != previousGroup){
+        if (test_.currentGroup != previousGroup) {
 
           previousGroup = test_.currentGroup;
 
@@ -208,8 +208,8 @@
 
           // 'safeGroup' could be empty
           var grp = (safeGroup == '') ? null : te.query('#${safeGroup}');
-          if (grp != null){
-            grp.onClick.listen((_){
+          if (grp != null) {
+            grp.onClick.listen((_) {
               var row = document.query('.unittest-row-${safeGroup}');
               if (row.attributes['class'].contains('unittest-row ')){
                 document.queryAll('.unittest-row-${safeGroup}').forEach(
@@ -255,8 +255,8 @@
     }
 
     if (!test_.isComplete) {
-       addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.');
-       return;
+      addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.');
+      return;
     }
 
     addRowElement('${test_.id}', '${test_.result.toUpperCase()}',
diff --git a/pkg/unittest/lib/interactive_html_config.dart b/pkg/unittest/lib/interactive_html_config.dart
index baea6e1..46be199 100644
--- a/pkg/unittest/lib/interactive_html_config.dart
+++ b/pkg/unittest/lib/interactive_html_config.dart
@@ -46,7 +46,7 @@
   _Message(this.messageType, [this.elapsed = 0, this.body = '']);
 
   factory _Message.fromString(String msg) {
-    if(!msg.startsWith(_PREFIX)) {
+    if (!msg.startsWith(_PREFIX)) {
       return null;
     }
     int idx = msg.indexOf(' ', _PREFIX.length);
@@ -95,7 +95,7 @@
   WindowBase _parentWindow;
 
   /** The time at which tests start. */
-  final Map<int,DateTime> _testStarts;
+  final Map<int, DateTime> _testStarts;
 
   ChildInteractiveHtmlConfiguration() :
       _testStarts = new Map<int,DateTime>();
@@ -119,7 +119,7 @@
         _parentWindow = e.source;
         String search = window.location.search;
         int pos = search.indexOf('t=');
-        String ids = search.substring(pos+2);
+        String ids = search.substring(pos + 2);
         int id = int.parse(ids);
         setSoloTest(id);
         runTests();
@@ -134,7 +134,7 @@
   /** Record the start time of the test. */
   void onTestStart(TestCase testCase) {
     super.onTestStart(testCase);
-    _testStarts[testCase.id]= new DateTime.now();
+    _testStarts[testCase.id] = new DateTime.now();
   }
 
   /**
@@ -165,7 +165,7 @@
     int elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
     if (testCase.stackTrace != null) {
       var message = JSON.encode(testCase.stackTrace.frames.map((frame) {
-        return <String, dynamic>{
+        return <String, dynamic> {
           "uri": frame.uri.toString(),
           "line": frame.line,
           "column": frame.column,
@@ -192,7 +192,7 @@
  * in new functions that create child IFrames and run the real tests.
  */
 class ParentInteractiveHtmlConfiguration extends HtmlConfiguration {
-  final Map<int,DateTime> _testStarts;
+  final Map<int, DateTime> _testStarts;
 
 
   /** The stack that was posted back from the child, if any. */
@@ -238,7 +238,7 @@
     // Get the result, do any logging, then do a pass/fail.
     var msg = new _Message.fromString(e.data);
 
-    if(msg == null) {
+    if (msg == null) {
       return;
     }
     if (msg.messageType == _Message.LOG) {
@@ -302,7 +302,7 @@
 
   void onTestStart(TestCase testCase) {
     var id = testCase.id;
-    _testStarts[testCase.id]= new DateTime.now();
+    _testStarts[testCase.id] = new DateTime.now();
     super.onTestStart(testCase);
     _stack = null;
     // Convert the group name to a DOM id.
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index 0806506..6b5d5d6 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -99,7 +99,7 @@
 
   // Returns a pair (reason, location)
   List _compareIterables(expected, actual, matcher, depth, location) {
-    if (actual is !Iterable) {
+    if (actual is! Iterable) {
       return ['is not Iterable', location];
     }
     var expectedIterator = expected.iterator;
@@ -133,7 +133,7 @@
     bool equal;
     try {
       equal = (expected == actual);
-    } catch (e,s) {
+    } catch (e, s) {
       // TODO(gram): Add a test for this case.
       reason = '== threw "$e"';
       return [reason, location];
@@ -151,7 +151,7 @@
           location = result[1];
         }
       } else if (expected is Map && canRecurse) {
-        if (actual is !Map) {
+        if (actual is! Map) {
           reason = 'expected a map';
         } else {
           var err = (expected.length == actual.length) ? '' :
@@ -172,7 +172,7 @@
             if (reason == null) {
               for (var key in expected.keys) {
                 var rp = _recursiveMatch(expected[key], actual[key],
-                    "${location}['${key}']", depth+1);
+                    "${location}['${key}']", depth + 1);
                 if (rp != null) {
                   reason = rp[0];
                   location = rp[1];
@@ -202,7 +202,7 @@
   }
 
   String _match(expected, actual, Map matchState) {
-    var rp  = _recursiveMatch(expected, actual, '', 0);
+    var rp = _recursiveMatch(expected, actual, '', 0);
     if (rp == null) return null;
     var reason;
     if (rp[0].length > 0) {
@@ -438,7 +438,7 @@
       item();
       return false;
     } catch (e, s) {
-      if (_matcher == null ||_matcher.matches(e, matchState)) {
+      if (_matcher == null || _matcher.matches(e, matchState)) {
         return true;
       } else {
         addStateInfo(matchState, {'exception': e, 'stack': s});
diff --git a/pkg/unittest/lib/src/iterable_matchers.dart b/pkg/unittest/lib/src/iterable_matchers.dart
index 2189286..047903b 100644
--- a/pkg/unittest/lib/src/iterable_matchers.dart
+++ b/pkg/unittest/lib/src/iterable_matchers.dart
@@ -145,7 +145,7 @@
           add(' not an Iterable');
     } else {
       return super.describeMismatch(item, mismatchDescription, matchState,
-        verbose);
+          verbose);
     }
   }
 }
diff --git a/pkg/unittest/lib/src/numeric_matchers.dart b/pkg/unittest/lib/src/numeric_matchers.dart
index 4c8cd93..dc0e3a6 100644
--- a/pkg/unittest/lib/src/numeric_matchers.dart
+++ b/pkg/unittest/lib/src/numeric_matchers.dart
@@ -199,7 +199,7 @@
     this._lowMatchValue, this._highMatchValue);
 
   bool matches(value, Map matchState) {
-    if (value is !num) {
+    if (value is! num) {
       return false;
     }
     if (value < _low || value > _high) {
diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
index 0c65e42..95068bd 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -64,9 +64,9 @@
   Completer _testComplete;
 
   TestCase._internal(this.id, this.description, this.testFunction)
-  : currentGroup = _currentContext.fullName,
-    setUp = _currentContext.testSetup,
-    tearDown = _currentContext.testTeardown;
+      : currentGroup = _currentContext.fullName,
+        setUp = _currentContext.testSetup,
+        tearDown = _currentContext.testTeardown;
 
   bool get isComplete => !enabled || result != null;
 
diff --git a/pkg/unittest/lib/src/utils.dart b/pkg/unittest/lib/src/utils.dart
index 380a119..ef724e3 100644
--- a/pkg/unittest/lib/src/utils.dart
+++ b/pkg/unittest/lib/src/utils.dart
@@ -59,7 +59,7 @@
 
   String toString() => '($first, $last)';
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (other is! Pair) return false;
     return other.first == first && other.last == last;
   }
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index 41bfc92..eae5a13 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -169,8 +169,8 @@
  * Throws a [StateError] if there is an existing, incompatible value.
  */
 void set unittestConfiguration(Configuration value) {
-  if(!identical(_config, value)) {
-    if(_config != null) {
+  if (!identical(_config, value)) {
+    if (_config != null) {
       throw new StateError('unittestConfiguration has already been set');
     }
     _config = value;
@@ -301,9 +301,9 @@
 // imply that the test fails). We can't do it without also changing
 // the testrunner and test.dart though.
 /// Result string for a passing test case.
-const PASS  = 'pass';
+const PASS = 'pass';
 /// Result string for a failing test case.
-const FAIL  = 'fail';
+const FAIL = 'fail';
 /// Result string for an test case with an error.
 const ERROR = 'error';
 
diff --git a/pkg/unittest/test/mirror_matchers_test.dart b/pkg/unittest/test/mirror_matchers_test.dart
index 2fe0319..8ebfd02 100644
--- a/pkg/unittest/test/mirror_matchers_test.dart
+++ b/pkg/unittest/test/mirror_matchers_test.dart
@@ -42,4 +42,4 @@
         'Which: has a member named "staticGetter",'
         ' but it is not an instance property');
   });
-}
\ No newline at end of file
+}
diff --git a/pkg/unittest/test/mock_stepwise_negative_test.dart b/pkg/unittest/test/mock_stepwise_negative_test.dart
index 8bf4955..27926a1 100644
--- a/pkg/unittest/test/mock_stepwise_negative_test.dart
+++ b/pkg/unittest/test/mock_stepwise_negative_test.dart
@@ -14,8 +14,6 @@
       logList.add(e);
     }
     int total = 0;
-    logList.stepwiseValidate((log, pos) {
-        return 0;
-    });
+    logList.stepwiseValidate((log, pos) => 0);
   });
 }
diff --git a/pkg/unittest/test/mock_test.dart b/pkg/unittest/test/mock_test.dart
index b2c01f4..6766955 100644
--- a/pkg/unittest/test/mock_test.dart
+++ b/pkg/unittest/test/mock_test.dart
@@ -193,7 +193,7 @@
   });
 
   test('Mocking: No logging', () {
-    var m = new Mock.custom(enableLogging:false);
+    var m = new Mock.custom(enableLogging: false);
     m.Test();
     expect(() => m.getLogs(callsTo('Test')), throwsA((e) => e.toString() ==
         "Exception: Can't retrieve logs when logging was never enabled."));
diff --git a/pkg/unittest/test/test_common.dart b/pkg/unittest/test/test_common.dart
index 8631768..da9e9e5 100644
--- a/pkg/unittest/test/test_common.dart
+++ b/pkg/unittest/test/test_common.dart
@@ -25,8 +25,8 @@
   bool contains(int val) => count < val ? false : true;
 
   bool any(bool f(element)) {
-    for(var i = 0; i <= count; i++) {
-      if(f(i)) return true;
+    for (var i = 0; i <= count; i++) {
+      if (f(i)) return true;
     }
     return false;
   }
diff --git a/pkg/unittest/test/unittest_completion_test.dart b/pkg/unittest/test/unittest_completion_test.dart
index 97fa9d0..843f9d0 100644
--- a/pkg/unittest/test/unittest_completion_test.dart
+++ b/pkg/unittest/test/unittest_completion_test.dart
@@ -24,4 +24,4 @@
   });
 };
 
-var expected =  buildStatusString(1, 0, 0, testName, count: 10);
+var expected = buildStatusString(1, 0, 0, testName, count: 10);
diff --git a/pkg/unittest/test/unittest_skipped_soloed_nested_test.dart b/pkg/unittest/test/unittest_skipped_soloed_nested_test.dart
index 2ec908d..3cbd09d 100644
--- a/pkg/unittest/test/unittest_skipped_soloed_nested_test.dart
+++ b/pkg/unittest/test/unittest_skipped_soloed_nested_test.dart
@@ -14,8 +14,7 @@
 var testFunction = (_) {
   StringBuffer s = null;
   setUp(() {
-    if (s == null)
-      s = new StringBuffer();
+    if (s == null) s = new StringBuffer();
   });
   test('top level', () {
     s.write('A');
diff --git a/pkg/unittest/test/unittest_test_utils.dart b/pkg/unittest/test/unittest_test_utils.dart
index 92555dd..adb9823 100644
--- a/pkg/unittest/test/unittest_test_utils.dart
+++ b/pkg/unittest/test/unittest_test_utils.dart
@@ -59,13 +59,13 @@
 }
 
 makeDelayedSetup(index, s) => () {
-  return new Future.delayed(new Duration(milliseconds:1), () {
+  return new Future.delayed(new Duration(milliseconds: 1), () {
     s.write('l$index U ');
   });
 };
 
 makeDelayedTeardown(index, s) => () {
-  return new Future.delayed(new Duration(milliseconds:1), () {
+  return new Future.delayed(new Duration(milliseconds: 1), () {
     s.write('l$index D ');
   });
 };
diff --git a/pkg/watcher/lib/src/directory_watcher/mac_os.dart b/pkg/watcher/lib/src/directory_watcher/mac_os.dart
index ba0ede4..e3efa2d 100644
--- a/pkg/watcher/lib/src/directory_watcher/mac_os.dart
+++ b/pkg/watcher/lib/src/directory_watcher/mac_os.dart
@@ -109,7 +109,7 @@
 
   void close() {
     if (MacOSDirectoryWatcher.logDebugInfo) {
-      print("[$_id] watcher is closed");
+      print("[$_id] watcher is closed\n${new Chain.current().terse}");
     }
     if (_watchSubscription != null) _watchSubscription.cancel();
     if (_initialListSubscription != null) _initialListSubscription.cancel();
@@ -468,6 +468,10 @@
 
   /// Emit an error, then close the watcher.
   void _emitError(error, StackTrace stackTrace) {
+    if (MacOSDirectoryWatcher.logDebugInfo) {
+      print("[$_id] emitting error: $error\n" +
+          "${new Chain.forTrace(stackTrace).terse}");
+    }
     _eventsController.addError(error, stackTrace);
     close();
   }
diff --git a/runtime/bin/vmservice/client/deployed/web/index.html b/runtime/bin/vmservice/client/deployed/web/index.html
index a0ca897..58ade8b 100644
--- a/runtime/bin/vmservice/client/deployed/web/index.html
+++ b/runtime/bin/vmservice/client/deployed/web/index.html
@@ -1,10 +1,12 @@
-<!DOCTYPE html><html><head><script src="packages/shadow_dom/shadow_dom.debug.js"></script>
-<script src="packages/custom_element/custom-elements.debug.js"></script>
-<script src="packages/browser/interop.js"></script>
+<!DOCTYPE html><html><head>
 
-  <title>Dart VM Observatory</title>
+
   <meta charset="utf-8">
   <link type="text/css" rel="stylesheet" href="bootstrap_css/css/bootstrap.min.css">
+
+  <title>Dart VM Observatory</title>
+  <script type="text/javascript" src="https://www.google.com/jsapi"></script>
+  
   
   <script src="index.html_bootstrap.dart.js"></script>
   
@@ -73,15 +75,19 @@
 <template>
 <div>
   <template if="{{ (ref['type'] == 'null') }}">
-    {{ "null" }}
+    unexpected null
   </template>
-  <template if="{{ (ref['type'] != 'null') }}">
-  <a href="{{ url }}">{{ name }} </a>
+  <template if="{{ (ref['type'] == '@Null') }}">
+    {{ name }}
+  </template>
+  <template if="{{ (ref['type'] != 'null') &amp;&amp; ref['type'] != '@Null' }}">
+    <a href="{{ url }}">{{ name }} </a>
   </template>
  </div>
 </template>
 
-</polymer-element><polymer-element name="library-ref" extends="service-ref">
+</polymer-element>
+<polymer-element name="library-ref" extends="service-ref">
 <template>
   <a href="{{ url }}">{{ name }}</a>
 </template>
@@ -298,49 +304,115 @@
   
 </polymer-element><polymer-element name="isolate-summary" extends="observatory-element">
   <template>
-  	<div class="row">
-  	  <div class="col-md-1">
+    <div class="row">
+      <div class="col-md-1">
         <img src="img/isolate_icon.png" class="img-polaroid">
-  	  </div>
-  	  <div class="col-md-1">{{ isolate }}</div>
-  	  <div class="col-md-10">{{ name }}</div>
-  	</div>
-  	<div class="row">
-  	  <div class="col-md-2"></div>
-  	  <div class="col-md-1">
-  	  	<a href="{{ app.locationManager.relativeLink(isolate, 'stacktrace') }}">Stacktrace</a>
-  	  </div>
-      <div class="col-md-1">
-        <a href="{{ app.locationManager.relativeLink(isolate, 'library') }}">Library</a>
       </div>
-      <div class="col-md-1">
-        <a href="{{ app.locationManager.relativeLink(isolate, 'debug/breakpoints') }}">Breakpoints</a>
+
+      <div class="col-md-1">{{ isolate.name }}</div>
+
+      <!-- TODO(turnidge): Use function-ref when it can take isolate param -->
+      <div class="col-md-4">
+
+        <div class="row">
+          <template if="{{ isolate.entry['id'] != null }}">
+            <a href="{{ app.locationManager.relativeLink(isolate.id, isolate.entry['id']) }}">
+              {{ isolate.entry['name'] }}
+            </a>
+          </template>
+          <template if="{{ isolate.entry['id'] == null }}">
+            <!-- fred -->
+            root isolate
+          </template>
+        </div>
+
+        <div class="row">
+          <small>
+            (<a href="{{ app.locationManager.relativeLink(isolate.id, isolate.rootLib) }}">library</a>)
+            (<a href="{{ app.locationManager.relativeLink(isolate.id, 'debug/breakpoints') }}">breakpoints</a>)
+            (<a href="{{ app.locationManager.relativeLink(isolate.id, 'profile') }}">profile</a>)
+          </small>
+        </div>
       </div>
-      <div class="col-md-1">
-        <a href="{{ app.locationManager.relativeLink(isolate, 'profile') }}">Profile</a>
+
+      <div class="col-md-2">
+        <div class="row">
+          <div class="col-md-3">{{ isolate.timers['total'] | formatTime }}</div>
+          <div class="col-md-1"></div>
+          <div class="col-md-3"><p class="text-muted">total</p></div>
+        </div>
+        <div class="row">
+          <div class="col-md-3">{{ isolate.timers['dart'] | formatTime }}</div>
+          <div class="col-md-1"></div>
+          <div class="col-md-3"><p class="text-muted">dart</p></div>
+        </div>
+        <div class="row">
+          <div class="col-md-3">{{ isolate.timers['compile'] | formatTime }}</div>
+          <div class="col-md-1"></div>
+          <div class="col-md-3"><p class="text-muted">compile</p></div>
+        </div>
+        <div class="row">
+          <div class="col-md-3">{{ isolate.timers['gc'] | formatTime }}</div>
+          <div class="col-md-1"></div>
+          <div class="col-md-3"><p class="text-muted">gc</p></div>
+        </div>
+        <div class="row">
+          <div class="col-md-3">{{ isolate.timers['init'] | formatTime }}</div>
+          <div class="col-md-1"></div>
+          <div class="col-md-3"><p class="text-muted">init</p></div>
+        </div>
       </div>
-      <div class="col-md-1">
-        <a href="{{ app.locationManager.relativeLink(isolate, 'allocationprofile') }}">Allocation Profile</a>
+      <div class="col-md-2">
+        <a href="{{ app.locationManager.relativeLink(isolate.id, 'allocationprofile') }}">
+          {{ isolate.newHeapUsed | formatSize }}/{{ isolate.oldHeapUsed | formatSize }}
+        </a>
       </div>
-  	  <div class="col-md-8"></div>
+      <div class="col-md-2">
+        <template if="{{ isolate.topFrame == null }}">
+          idle
+        </template>
+        <template if="{{ isolate.topFrame != null }}">
+          run
+        </template>
+        ( <a href="{{ app.locationManager.relativeLink(isolate.id, 'stacktrace') }}">stack trace</a> )
+      </div>
+    </div>
+    <div class="row">
+      <div class="col-md-3">
+      </div>
+      <div class="col-md-6">
+        <template if="{{ isolate.topFrame != null }}">
+          <a href="{{ app.locationManager.relativeLink(isolate.id, isolate.topFrame['function']['id']) }}">
+            {{ isolate.topFrame['function']['user_name'] }}
+          </a>
+          (<a href="{{ app.locationManager.relativeLink(isolate.id, isolate.topFrame['script']['id']) }}">
+            {{ isolate.topFrame | fileAndLine }}
+          </a>)
+          <br>
+          <pre>{{ isolate.topFrame['line'] }} &nbsp; {{ isolate.topFrame['lineString'] }}</pre>
+        </template>
+      </div>
+      <div class="col-md-3">
+      </div>
     </div>
   </template>
   
 </polymer-element>
 <polymer-element name="isolate-list" extends="observatory-element">
   <template>
+      <button type="button" on-click="{{refresh}}">Refresh</button>
       <ul class="list-group">
       <template repeat="{{ isolate in app.isolateManager.isolates.values }}">
       	<li class="list-group-item">
-        <isolate-summary app="{{ app }}" isolate="{{ isolate.id }}" name="{{ isolate.name }}"></isolate-summary>
+        <isolate-summary app="{{ app }}" isolate="{{ isolate }}"></isolate-summary>
         </li>
       </template>
       </ul>
       (<a href="{{ app.locationManager.absoluteLink('cpu') }}">cpu</a>)
-      
   </template>
   
-</polymer-element><polymer-element name="instance-view" extends="observatory-element">
+</polymer-element>
+<polymer-element name="instance-view" extends="observatory-element">
   <template>
     <div class="row">
     <div class="col-md-8 col-md-offset-2">
@@ -480,50 +552,61 @@
 
   </template>
   
-</polymer-element><polymer-element name="heap-profile" extends="observatory-element">
+</polymer-element>
+<polymer-element name="heap-profile" extends="observatory-element">
 <template>
   <div>
   <button type="button" on-click="{{refreshData}}">Refresh</button>
   </div>
-  <div>
-  <span>New Space </span>
-  <span>{{ status(true) }}</span>
+  <div class="row">
+    <div id="newPieChart" class="col-md-4" style="height: 400px">
+    </div>
+    <div id="newStatus" class="col-md-2">
+      <table class="table">
+        <tbody>
+          <tr>
+            <td>Collections</td>
+            <td>{{ formattedCollections(true) }}</td>
+          </tr>
+          <tr>
+            <td>Average Collection Time</td>
+            <td>{{ formattedAverage(true) }}</td>
+          </tr>
+          <tr>
+            <td>Cumulative Collection Time</td>
+            <td>{{ formattedTotalCollectionTime(true) }}</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div id="oldPieChart" class="col-md-4" style="height: 400px">
+    </div>
+    <div id="oldStatus" class="col-md-2">
+      <table class="table">
+        <tbody>
+          <tr>
+            <td>Collections</td>
+            <td>{{ formattedCollections(true) }}</td>
+          </tr>
+          <tr>
+            <td>Average Collection Time</td>
+            <td>{{ formattedAverage(true) }}</td>
+          </tr>
+          <tr>
+            <td>Cumulative Collection Time</td>
+            <td>{{ formattedTotalCollectionTime(true) }}</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
   </div>
-  <div>
-  <span>Old Space </span>
-  <span>{{ status(false) }}</span>
+  <div class="row">
+    <div id="table" class="col-md-12" style="height: 800px"></div>
   </div>
-  <table class="table table-hover">
-    <thead>
-      <tr>
-        <th>Class</th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="1">Current (new)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="2">Allocated since GC (new)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="3">Total before last GC (new)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="4">Total after last GC (new)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="5">Current (old)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="6">Allocated since GC (old)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="7">Total before last GC (old)</button></th>
-        <th><button on-click="{{changeSortColumn}}" data-msg="8">Total after last GC (old)</button></th>
-      </tr>
-    </thead>
-    <tbody>
-    <tr template="" repeat="{{ cls in sortedProfile }}">
-      <td><class-ref app="{{ app }}" ref="{{ cls['class'] }}"></class-ref></td>
-      <td>{{ current(cls, true) }}</td>
-      <td>{{ allocated(cls, true) }}</td>
-      <td>{{ beforeGC(cls, true) }}</td>
-      <td>{{ afterGC(cls, true) }}</td>
-      <td>{{ current(cls, false) }}</td>
-      <td>{{ allocated(cls, false) }}</td>
-      <td>{{ beforeGC(cls, false) }}</td>
-      <td>{{ afterGC(cls, false) }}</td>
-    </tr>
-    </tbody>
-  </table>
 </template>
 
-</polymer-element><polymer-element name="script-view" extends="observatory-element">
+</polymer-element>
+<polymer-element name="script-view" extends="observatory-element">
 <template>
   <div class="row">
     <div class="col-md-8 col-md-offset-2">
@@ -547,30 +630,57 @@
   </div>
 </template>
 
-</polymer-element><polymer-element name="stack-trace" extends="observatory-element">
+</polymer-element><polymer-element name="stack-frame" extends="observatory-element">
   <template>
-  <div class="alert alert-info">Stack Trace</div>
-  <table class="table table-hover">
-    <thead>
-      <tr>
-        <th>Depth</th>
-        <th>Function</th>
-        <th>Script</th>
-        <th>Line</th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr template="" repeat="{{ frame in trace['members'] }}">
-        <td></td>
-        <td><function-ref app="{{ app }}" ref="{{ frame['function'] }}"></function-ref></td>
-        <td><script-ref app="{{ app }}" ref="{{ frame['script'] }}"></script-ref></td>
-        <td>{{ frame['line'] }}</td>
-      </tr>
-    </tbody>
-  </table>
+    <div class="row">
+      <div class="col-md-1"></div>
+      <div class="col-md-1">
+        #{{ frame['depth'] }}
+      </div>
+      <div class="col-md-9">
+        <function-ref app="{{ app }}" ref="{{ frame['function'] }}"></function-ref>
+        ( <script-ref app="{{ app }}" ref="{{ frame['script'] }}"></script-ref>:{{ frame['line'] }} )
+      </div>
+      <div class="col-md-1"></div>
+    </div>
+
+    <template repeat="{{ v in frame['vars'] }}">
+      <div class="row">
+        <div class="col-md-3"></div>
+        <div class="col-md-1">
+          {{ v['name'] }}
+        </div>
+        <div class="col-md-6">
+          <instance-ref app="{{ app }}" ref="{{ v['value'] }}"></instance-ref>
+        </div>
+        <div class="col-md-2"></div>
+      </div>
+    </template>
+
   </template>
   
-</polymer-element><polymer-element name="message-viewer" extends="observatory-element">
+</polymer-element>
+<polymer-element name="stack-trace" extends="observatory-element">
+  <template>
+    <template if="{{ trace['members'].isEmpty }}">
+      <div class="col-md-1"></div>
+      <div class="col-md-11">
+        <em>No stack</em>
+      </div>
+    </template>
+    <template if="{{ trace['members'].isNotEmpty }}">
+      <ul class="list-group">
+        <template repeat="{{ frame in trace['members'] }}">
+          <li class="list-group-item">
+            <stack-frame app="{{ app }}" frame="{{ frame }}"></stack-frame>
+          </li>
+        </template>
+      </ul>
+    </template>
+  </template>
+  
+</polymer-element>
+<polymer-element name="message-viewer" extends="observatory-element">
   <!--
     This is a big switch statement which instantiates the custom element
     designated to display the message type.
@@ -713,4 +823,4 @@
 </polymer-element>
   <observatory-application></observatory-application>
 
-</body></html>
+</body></html>
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart b/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart
deleted file mode 100644
index 4d2d042..0000000
--- a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-library app_bootstrap;
-
-import 'package:polymer/polymer.dart';
-
-import 'package:observatory/src/observatory_elements/observatory_element.dart' as i0;
-import 'package:observatory/src/observatory_elements/class_view.dart' as i1;
-import 'package:observatory/src/observatory_elements/disassembly_entry.dart' as i2;
-import 'package:observatory/src/observatory_elements/code_view.dart' as i3;
-import 'package:observatory/src/observatory_elements/collapsible_content.dart' as i4;
-import 'package:observatory/src/observatory_elements/error_view.dart' as i5;
-import 'package:observatory/src/observatory_elements/field_view.dart' as i6;
-import 'package:observatory/src/observatory_elements/function_view.dart' as i7;
-import 'package:observatory/src/observatory_elements/isolate_summary.dart' as i8;
-import 'package:observatory/src/observatory_elements/isolate_list.dart' as i9;
-import 'package:observatory/src/observatory_elements/json_view.dart' as i10;
-import 'package:observatory/src/observatory_elements/library_view.dart' as i11;
-import 'package:observatory/src/observatory_elements/source_view.dart' as i12;
-import 'package:observatory/src/observatory_elements/script_view.dart' as i13;
-import 'package:observatory/src/observatory_elements/stack_trace.dart' as i14;
-import 'package:observatory/src/observatory_elements/message_viewer.dart' as i15;
-import 'package:observatory/src/observatory_elements/navigation_bar.dart' as i16;
-import 'package:observatory/src/observatory_elements/response_viewer.dart' as i17;
-import 'package:observatory/src/observatory_elements/observatory_application.dart' as i18;
-import 'index.html.0.dart_modified.dart' as i19;
-
-void main() {
-  configureForDeployment([
-      'package:observatory/src/observatory_elements/observatory_element.dart',
-      'package:observatory/src/observatory_elements/class_view.dart',
-      'package:observatory/src/observatory_elements/disassembly_entry.dart',
-      'package:observatory/src/observatory_elements/code_view.dart',
-      'package:observatory/src/observatory_elements/collapsible_content.dart',
-      'package:observatory/src/observatory_elements/error_view.dart',
-      'package:observatory/src/observatory_elements/field_view.dart',
-      'package:observatory/src/observatory_elements/function_view.dart',
-      'package:observatory/src/observatory_elements/isolate_summary.dart',
-      'package:observatory/src/observatory_elements/isolate_list.dart',
-      'package:observatory/src/observatory_elements/json_view.dart',
-      'package:observatory/src/observatory_elements/library_view.dart',
-      'package:observatory/src/observatory_elements/source_view.dart',
-      'package:observatory/src/observatory_elements/script_view.dart',
-      'package:observatory/src/observatory_elements/stack_trace.dart',
-      'package:observatory/src/observatory_elements/message_viewer.dart',
-      'package:observatory/src/observatory_elements/navigation_bar.dart',
-      'package:observatory/src/observatory_elements/response_viewer.dart',
-      'package:observatory/src/observatory_elements/observatory_application.dart',
-      'index.html.0.dart_modified.dart',
-    ]);
-  i19.polymerMainWrapper();
-}
diff --git a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js b/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
index 7198a03..54dc538 100644
--- a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
+++ b/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
@@ -8294,7 +8294,7 @@
 init()
 $=I.p
 var $$={}
-;init.mangledNames={gBA:"__$methodCountSelected",gHX:"__$displayValue",gKM:"$",gL4:"human",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gW2:"__$sortedProfile",gXB:"_message",gXJ:"lines",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",ga:"a",gaj:"methodCounts",gb:"b",gc:"c",geE:"__$msg",geJ:"__$code",geb:"__$json",ghm:"__$app",gi0:"__$name",gi2:"isolates",giZ:"__$topInclusiveCodes",gk5:"__$devtools",gkf:"_count",glb:"__$cls",glw:"requestManager",gm0:"__$instruction",gm7:"machine",gnI:"isolateManager",goH:"columns",gpU:"__$library",gqY:"__$topExclusiveCodes",gql:"__$function",gqt:"_sortColumnIndex",grK:"__$links",gtY:"__$ref",gvH:"index",gva:"instructions",gvt:"__$field",gzh:"__$iconClass"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",Hg:"ALLOCATED_BEFORE_GC_SIZE",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",d6:"ALLOCATED_SINCE_GC_SIZE",jr:"ALLOCATED_SINCE_GC",kh:"LIVE_AFTER_GC"};(function (reflectionData) {
+;init.mangledNames={gBA:"__$methodCountSelected",gCO:"_oldPieChart",gF0:"__$cls",gGQ:"_newPieDataTable",gGj:"_message",gHX:"__$displayValue",gJ0:"_newPieChart",gKM:"$",gL4:"human",gLE:"timers",gN7:"__$library",gOc:"_oldPieDataTable",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gSw:"lines",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gVa:"__$frame",gX3:"_first",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",gZ8:"__$function",ga:"a",gan:"_tableChart",gb:"b",gc:"c",ge6:"_tableDataTable",geE:"__$msg",geJ:"__$code",geb:"__$json",gfb:"methodCounts",ghm:"__$app",gi2:"isolates",giZ:"__$topInclusiveCodes",gk5:"__$devtools",gkf:"_count",glw:"requestManager",gm0:"__$instruction",gm7:"machine",gnI:"isolateManager",gqY:"__$topExclusiveCodes",grK:"__$links",gtY:"__$ref",gvH:"index",gva:"instructions",gvt:"__$field",gzh:"__$iconClass"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",Hg:"ALLOCATED_BEFORE_GC_SIZE",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",d6:"ALLOCATED_SINCE_GC_SIZE",jr:"ALLOCATED_SINCE_GC",xK:"LIVE_AFTER_GC"};(function (reflectionData) {
   "use strict";
   function map(x){x={x:x};delete x.x;return x}
     function processStatics(descriptor) {
@@ -8598,7 +8598,7 @@
 n:[function(a,b){return a===b},"call$1","gUJ",2,0,null,104],
 giO:function(a){return H.eQ(a)},
 bu:[function(a){return H.a5(a)},"call$0","gXo",0,0,null],
-T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,330],
+T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,332],
 gbx:function(a){return new H.cu(H.dJ(a),null)},
 $isGv:true,
 "%":"DOMImplementation|SVGAnimatedEnumeration|SVGAnimatedNumberList|SVGAnimatedString"},
@@ -8608,7 +8608,7 @@
 giO:function(a){return a?519018:218159},
 gbx:function(a){return C.HL},
 $isbool:true},
-CD:{
+PE:{
 "":"Gv;",
 n:[function(a,b){return null==b},"call$1","gUJ",2,0,null,104],
 bu:[function(a){return"null"},"call$0","gXo",0,0,null],
@@ -8637,8 +8637,8 @@
 for(z=0;z<a.length;++z)if(J.de(a[z],b)){a.splice(z,1)
 return!0}return!1},"call$1","gRI",2,0,null,124],
 ev:[function(a,b){return H.VM(new H.U5(a,b),[null])},"call$1","gIR",2,0,null,110],
-Ay:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(a,z.gl(z))},"call$1","gDY",2,0,null,331],
+FV:[function(a,b){var z
+for(z=J.GP(b);z.G();)this.h(a,z.gl())},"call$1","gDY",2,0,null,333],
 V1:[function(a){this.sB(a,0)},"call$0","gyP",0,0,null],
 aN:[function(a,b){return H.bQ(a,b)},"call$1","gjw",2,0,null,110],
 ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110],
@@ -8648,8 +8648,8 @@
 y.fixed$length=init
 for(x=0;x<a.length;++x){w=H.d(a[x])
 if(x>=z)return H.e(y,x)
-y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,332,333],
-eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gVQ",2,0,null,288],
+y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,334,335],
+eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gVQ",2,0,null,292],
 Zv:[function(a,b){if(b>>>0!==b||b>=a.length)return H.e(a,b)
 return a[b]},"call$1","goY",2,0,null,47],
 D6:[function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(new P.AT(b))
@@ -8659,8 +8659,8 @@
 if(c<b||c>a.length)throw H.b(P.TE(c,b,a.length))}if(b===c)return H.VM([],[H.Kp(a,0)])
 return H.VM(a.slice(b,c),[H.Kp(a,0)])},function(a,b){return this.D6(a,b,null)},"Jk","call$2",null,"gli",2,2,null,77,115,116],
 Mu:[function(a,b,c){H.S6(a,b,c)
-return H.j5(a,b,c,null)},"call$2","gRP",4,0,null,115,116],
-gFV:function(a){if(a.length>0)return a[0]
+return H.j5(a,b,c,null)},"call$2","gYf",4,0,null,115,116],
+gtH:function(a){if(a.length>0)return a[0]
 throw H.b(new P.lj("No elements"))},
 grZ:function(a){var z=a.length
 if(z>0)return a[z-1]
@@ -8675,11 +8675,11 @@
 if(typeof c!=="number")return H.s(c)
 H.Gj(a,c,a,b,z-c)
 if(typeof b!=="number")return H.s(b)
-this.sB(a,z-(c-b))},"call$2","gwF",4,0,null,115,116],
+this.sB(a,z-(c-b))},"call$2","gYH",4,0,null,115,116],
 Vr:[function(a,b){return H.Ck(a,b)},"call$1","gG2",2,0,null,110],
 So:[function(a,b){if(!!a.immutable$list)H.vh(P.f("sort"))
 H.ZE(a,0,a.length-1,b)},"call$1","gH7",0,2,null,77,128],
-XU:[function(a,b,c){return H.Ri(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,334,124,115],
+XU:[function(a,b,c){return H.Ri(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,336,124,115],
 Pk:[function(a,b,c){return H.lO(a,b,a.length-1)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gkl",2,2,null,77,124,115],
 tg:[function(a,b){var z
 for(z=0;z<a.length;++z)if(J.de(a[z],b))return!0
@@ -8691,7 +8691,7 @@
 if(b)return H.VM(a.slice(),[H.Kp(a,0)])
 else{z=H.VM(a.slice(),[H.Kp(a,0)])
 z.fixed$length=init
-return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 gA:function(a){return H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)])},
 giO:function(a){return H.eQ(a)},
 gB:function(a){return a.length},
@@ -8699,7 +8699,7 @@
 if(b<0)throw H.b(P.N(b))
 if(!!a.fixed$length)H.vh(P.f("set length"))
 a.length=b},
-t:[function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(P.u(b))
+t:[function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(new P.AT(b))
 if(b>=a.length||b<0)throw H.b(P.N(b))
 return a[b]},"call$1","gIA",2,0,null,47],
 u:[function(a,b,c){if(!!a.immutable$list)H.vh(P.f("indexed set"))
@@ -8747,12 +8747,11 @@
 HG:[function(a){return this.yu(this.UD(a))},"call$0","gD5",0,0,null],
 UD:[function(a){if(a<0)return-Math.round(-a)
 else return Math.round(a)},"call$0","gE8",0,0,null],
-Hp:[function(a){return a},"call$0","gfp",0,0,null],
 yM:[function(a,b){var z
 if(b>20)throw H.b(P.C3(b))
 z=a.toFixed(b)
 if(a===0&&this.gzP(a))return"-"+z
-return z},"call$1","gfE",2,0,null,337],
+return z},"call$1","gfE",2,0,null,339],
 WZ:[function(a,b){if(b<2||b>36)throw H.b(P.C3(b))
 return a.toString(b)},"call$1","gEI",2,0,null,28],
 bu:[function(a){if(a===0&&1/a<0)return"-0.0"
@@ -8767,6 +8766,11 @@
 return a/b},"call$1","gJj",2,0,null,104],
 U:[function(a,b){if(typeof b!=="number")throw H.b(new P.AT(b))
 return a*b},"call$1","gEH",2,0,null,104],
+Y:[function(a,b){var z=a%b
+if(z===0)return 0
+if(z>0)return z
+if(b<0)return z-b
+else return z+b},"call$1","gQR",2,0,null,104],
 Z:[function(a,b){if((a|0)===a&&(b|0)===b&&0!==b&&-1!==b)return a/b|0
 else return this.yu(a/b)},"call$1","gdG",2,0,null,104],
 cU:[function(a,b){return(a|0)===a?a/b|0:this.yu(a/b)},"call$1","gPf",2,0,null,104],
@@ -8790,7 +8794,7 @@
 return a>b},"call$1","gh1",2,0,null,104],
 E:[function(a,b){if(typeof b!=="number")throw H.b(new P.AT(b))
 return a<=b},"call$1","gf5",2,0,null,104],
-F:[function(a,b){if(typeof b!=="number")throw H.b(P.u(b))
+F:[function(a,b){if(typeof b!=="number")throw H.b(new P.AT(b))
 return a>=b},"call$1","gNH",2,0,null,104],
 $isnum:true,
 static:{"":"xr,LN"}},
@@ -8800,7 +8804,7 @@
 $isdouble:true,
 $isnum:true,
 $isint:true},
-Pp:{
+GW:{
 "":"double/P;",
 gbx:function(a){return C.O4},
 $isdouble:true,
@@ -8816,8 +8820,8 @@
 j:[function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(P.u(b))
 if(b<0)throw H.b(P.N(b))
 if(b>=a.length)throw H.b(P.N(b))
-return a.charCodeAt(b)},"call$1","gbw",2,0,null,47],
-dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,338],
+return a.charCodeAt(b)},"call$1","gSu",2,0,null,47],
+dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,340],
 wL:[function(a,b,c){var z,y,x,w
 if(c<0||c>b.length)throw H.b(P.TE(c,0,b.length))
 z=a.length
@@ -8828,7 +8832,7 @@
 if(w>=y)H.vh(P.N(w))
 w=b.charCodeAt(w)
 if(x>=z)H.vh(P.N(x))
-if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,334,26,115],
+if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,336,26,115],
 g:[function(a,b){if(typeof b!=="string")throw H.b(new P.AT(b))
 return a+b},"call$1","gF1n",2,0,null,104],
 Tc:[function(a,b){var z,y
@@ -8842,16 +8846,16 @@
 if(c>a.length)throw H.b(P.TE(c,0,a.length))
 if(typeof b==="string"){z=c+b.length
 if(z>a.length)return!1
-return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,334,98,47],
-JT:[function(a,b,c){var z
+return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,336,98,47],
+Nj:[function(a,b,c){var z
 if(typeof b!=="number"||Math.floor(b)!==b)H.vh(P.u(b))
 if(c==null)c=a.length
 if(typeof c!=="number"||Math.floor(c)!==c)H.vh(P.u(c))
 z=J.Wx(b)
 if(z.C(b,0))throw H.b(P.N(b))
 if(z.D(b,c))throw H.b(P.N(b))
-if(J.xZ(c,a.length))throw H.b(P.N(c))
-return a.substring(b,c)},function(a,b){return this.JT(a,b,null)},"yn","call$2",null,"gKj",2,2,null,77,80,125],
+if(J.z8(c,a.length))throw H.b(P.N(c))
+return a.substring(b,c)},function(a,b){return this.Nj(a,b,null)},"yn","call$2",null,"gKj",2,2,null,77,80,125],
 hc:[function(a){return a.toLowerCase()},"call$0","gCW",0,0,null],
 bS:[function(a){var z,y,x,w,v
 for(z=a.length,y=0;y<z;){if(y>=z)H.vh(P.N(y))
@@ -8866,7 +8870,7 @@
 return a.substring(y,w)},"call$0","gZH",0,0,null],
 gZm:function(a){return new J.Qe(a)},
 XU:[function(a,b,c){if(c<0||c>a.length)throw H.b(P.TE(c,0,a.length))
-return a.indexOf(b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,334,98,115],
+return a.indexOf(b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,336,98,115],
 Pk:[function(a,b,c){var z,y,x
 c=a.length
 if(typeof b==="string"){z=b.length
@@ -8880,7 +8884,7 @@
 if(z.wL(b,a,x)!=null)return x;--x}return-1},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gkl",2,2,null,77,98,115],
 Is:[function(a,b,c){if(b==null)H.vh(new P.AT(null))
 if(c>a.length)throw H.b(P.TE(c,0,a.length))
-return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,334,104,80],
+return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,336,104,80],
 gl0:function(a){return a.length===0},
 gor:function(a){return a.length!==0},
 iM:[function(a,b){var z
@@ -8897,7 +8901,7 @@
 return 536870911&y+((16383&y)<<15>>>0)},
 gbx:function(a){return C.Db},
 gB:function(a){return a.length},
-t:[function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(P.u(b))
+t:[function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(new P.AT(b))
 if(b>=a.length||b<0)throw H.b(P.N(b))
 return a[b]},"call$1","gIA",2,0,null,47],
 $isString:true,
@@ -8913,7 +8917,7 @@
 y=J.Wx(b)
 if(y.C(b,0))H.vh(new P.bJ("value "+H.d(b)))
 if(y.F(b,z.length))H.vh(new P.bJ("value "+H.d(b)))
-return z.charCodeAt(b)},"call$1","gIA",2,0,null,339],
+return z.charCodeAt(b)},"call$1","gIA",2,0,null,341],
 $asIy:function(){return[J.im]},
 $asar:function(){return[J.im]},
 $asWO:function(){return[J.im]},
@@ -8923,7 +8927,7 @@
 init.globalState.Xz.bL()
 return z},"call$2","Ag",4,0,null,14,15],
 oT:[function(a){var z,y,x
-z=new H.O2(0,0,1,null,null,null,null,null,null,null,null,null,a)
+z=new H.f0(0,0,1,null,null,null,null,null,null,null,null,null,a)
 z.i6(a)
 init.globalState=z
 if(init.globalState.EF===!0)return
@@ -8982,20 +8986,20 @@
 k=init.globalState
 j=k.hJ
 k.hJ=j+1
-$.ep().u(0,l,j)
+$.p6().u(0,l,j)
 init.globalState.XC.u(0,j,l)
 l.postMessage(H.Gy(H.B7(["command","start","id",j,"replyTo",H.Gy(y),"args",o,"msg",H.Gy(n),"isSpawnUri",m,"functionName",r],P.L5(null,null,null,null,null))))
 break
 case"message":if(y.t(z,"port")!=null)J.H4(y.t(z,"port"),y.t(z,"msg"))
 init.globalState.Xz.bL()
 break
-case"close":init.globalState.XC.Rz(0,$.ep().t(0,a))
+case"close":init.globalState.XC.Rz(0,$.p6().t(0,a))
 a.terminate()
 init.globalState.Xz.bL()
 break
 case"log":H.ZF(y.t(z,"msg"))
 break
-case"print":if(init.globalState.EF===!0){y=init.globalState.GT
+case"print":if(init.globalState.EF===!0){y=init.globalState.my
 r=H.Gy(H.B7(["command","print","msg",z],P.L5(null,null,null,null,null)))
 y.toString
 self.postMessage(r)}else P.JS(y.t(z,"msg"))
@@ -9003,22 +9007,22 @@
 case"error":throw H.b(y.t(z,"msg"))
 default:}},"call$2","NB",4,0,null,17,18],
 ZF:[function(a){var z,y,x,w
-if(init.globalState.EF===!0){y=init.globalState.GT
+if(init.globalState.EF===!0){y=init.globalState.my
 x=H.Gy(H.B7(["command","log","msg",a],P.L5(null,null,null,null,null)))
 y.toString
 self.postMessage(x)}else try{$.jk().console.log(a)}catch(w){H.Ru(w)
 z=new H.XO(w,null)
-throw H.b(P.FM(z))}},"call$1","ap",2,0,null,19],
+throw H.b(P.FM(z))}},"call$1","o3",2,0,null,19],
 Gy:[function(a){var z
 if(init.globalState.ji===!0){z=new H.Bj(0,new H.X1())
-z.il=new H.aJ(null)
+z.il=new H.fP(null)
 return z.h7(a)}else{z=new H.NO(new H.X1())
-z.il=new H.aJ(null)
+z.il=new H.fP(null)
 return z.h7(a)}},"call$1","hX",2,0,null,20],
-Hh:[function(a){if(init.globalState.ji===!0)return new H.Iw(null).QS(a)
+Hh:[function(a){if(init.globalState.ji===!0)return new H.II(null).QS(a)
 else return a},"call$1","m6",2,0,null,20],
-VO:[function(a){return a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean"},"call$1","lF",2,0,null,21],
-uu:[function(a){return a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean"},"call$1","BL",2,0,null,21],
+VO:[function(a){return a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean"},"call$1","vP",2,0,null,21],
+ZR:[function(a){return a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean"},"call$1","WZ",2,0,null,21],
 PK:{
 "":"Tp:108;a",
 call$0:[function(){this.a.call$1([])},"call$0",null,0,0,null,"call"],
@@ -9027,8 +9031,8 @@
 "":"Tp:108;b",
 call$0:[function(){this.b.call$2([],null)},"call$0",null,0,0,null,"call"],
 $isEH:true},
-O2:{
-"":"a;Hg,oL,hJ,N0,Nr,Xz,Ws,EF,ji,i2@,GT,XC,w2",
+f0:{
+"":"a;Hg,oL,hJ,N0,Nr,Xz,vu,EF,ji,i2@,my,XC,w2<",
 i6:function(a){var z,y,x,w
 z=$.Qm()==null
 y=$.Nl()
@@ -9037,7 +9041,7 @@
 if(!x)y=y!=null&&$.Cl()!=null
 else y=!0
 this.ji=y
-this.Ws=z&&!x
+this.vu=z&&!x
 y=H.IY
 x=H.VM(new P.Sw(null,0,0,0),[y])
 x.Eo(null,y)
@@ -9045,7 +9049,7 @@
 this.i2=P.L5(null,null,null,J.im,H.aX)
 this.XC=P.L5(null,null,null,J.im,null)
 if(this.EF===!0){z=new H.JH()
-this.GT=z
+this.my=z
 w=function (e) { H.Mg(z, e); }
 $.jk().onmessage=w
 $.jk().dartPrint = function (object) {}}}},
@@ -9058,11 +9062,11 @@
 y=null
 try{y=a.call$0()}finally{init.globalState.N0=z
 if(z!=null)$=z.gEn()}return y},"call$1","goR",2,0,null,136],
-Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,340],
+Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,342],
 jT:[function(a,b,c){var z=this.Gx
 if(z.x4(b))throw H.b(P.FM("Registry: ports must be registered only once."))
 z.u(0,b,c)
-this.PC()},"call$2","gKI",4,0,null,340,341],
+this.PC()},"call$2","gKI",4,0,null,342,343],
 PC:[function(){var z=this.jO
 if(this.Gx.X5-this.fW.X5>0)init.globalState.i2.u(0,z,this)
 else init.globalState.i2.Rz(0,z)},"call$0","gi8",0,0,null],
@@ -9071,12 +9075,12 @@
 "":"a;Rk,bZ",
 Jc:[function(){var z=this.Rk
 if(z.av===z.HV)return
-return z.Ux()},"call$0","ghZ",0,0,null],
+return z.Ux()},"call$0","glk",0,0,null],
 xB:[function(){var z,y,x
 z=this.Jc()
-if(z==null){if(init.globalState.Nr!=null&&init.globalState.i2.x4(init.globalState.Nr.jO)&&init.globalState.Ws===!0&&init.globalState.Nr.Gx.X5===0)H.vh(P.FM("Program exited with open ReceivePorts."))
+if(z==null){if(init.globalState.Nr!=null&&init.globalState.i2.x4(init.globalState.Nr.jO)&&init.globalState.vu===!0&&init.globalState.Nr.Gx.X5===0)H.vh(P.FM("Program exited with open ReceivePorts."))
 y=init.globalState
-if(y.EF===!0&&y.i2.X5===0&&y.Xz.bZ===0){y=y.GT
+if(y.EF===!0&&y.i2.X5===0&&y.Xz.bZ===0){y=y.my
 x=H.Gy(H.B7(["command","close"],P.L5(null,null,null,null,null)))
 y.toString
 self.postMessage(x)}return!1}z.VU()
@@ -9088,7 +9092,7 @@
 else try{this.Wu()}catch(x){w=H.Ru(x)
 z=w
 y=new H.XO(x,null)
-w=init.globalState.GT
+w=init.globalState.my
 v=H.Gy(H.B7(["command","error","msg",H.d(z)+"\n"+H.d(y)],P.L5(null,null,null,null,null)))
 w.toString
 self.postMessage(v)}},"call$0","gcP",0,0,null]},
@@ -9098,8 +9102,8 @@
 P.rT(C.RT,this)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 IY:{
-"":"a;Aq*,xh,G1*",
-VU:[function(){this.Aq.vV(this.xh)},"call$0","gjF",0,0,null],
+"":"a;Aq*,i3,G1*",
+VU:[function(){this.Aq.vV(this.i3)},"call$0","gjF",0,0,null],
 $isIY:true},
 JH:{
 "":"a;"},
@@ -9130,17 +9134,17 @@
 if(x)z.call$1(y)
 else z.call$0()}}},"call$0",null,0,0,null,"call"],
 $isEH:true},
-AY:{
+Iy4:{
 "":"a;",
 $isbC:true},
 Z6:{
-"":"AY;JE,Jz",
+"":"Iy4;JE,Jz",
 wR:[function(a,b){var z,y,x,w,v
 z={}
 y=this.Jz
 x=init.globalState.i2.t(0,y)
 if(x==null)return
-if(this.JE.gfI())return
+if(this.JE.gP0())return
 w=init.globalState.N0!=null&&init.globalState.N0.jO!==y
 z.a=b
 if(w)z.a=H.Gy(b)
@@ -9158,14 +9162,14 @@
 "":"Tp:108;a,b,c",
 call$0:[function(){var z,y
 z=this.b.JE
-if(!z.gfI()){if(this.c){y=this.a
+if(!z.gP0()){if(this.c){y=this.a
 y.a=H.Hh(y.a)}J.t8(z,this.a.a)}},"call$0",null,0,0,null,"call"],
 $isEH:true},
 ns:{
-"":"AY;hQ,bv,Jz",
+"":"Iy4;hQ,bv,Jz",
 wR:[function(a,b){var z,y
 z=H.Gy(H.B7(["command","message","port",this,"msg",b],P.L5(null,null,null,null,null)))
-if(init.globalState.EF===!0){init.globalState.GT.toString
+if(init.globalState.EF===!0){init.globalState.my.toString
 self.postMessage(z)}else{y=init.globalState.XC.t(0,this.hQ)
 if(y!=null)y.postMessage(z)}},"call$1","gX8",2,0,null,20],
 n:[function(a,b){var z
@@ -9181,24 +9185,24 @@
 $isns:true,
 $isbC:true},
 yo:{
-"":"a;ng<,bd,fI<",
+"":"a;ng<,bd,P0<",
 wy:function(a){return this.bd.call$1(a)},
 cO:[function(a){var z
-if(this.fI)return
-this.fI=!0
+if(this.P0)return
+this.P0=!0
 this.bd=null
 z=init.globalState.N0
 z.Gx.Rz(0,this.ng)
 z.PC()},"call$0","gJK",0,0,null],
-FL:[function(a,b){if(this.fI)return
-this.wy(b)},"call$1","gfU",2,0,null,342],
+FL:[function(a,b){if(this.P0)return
+this.wy(b)},"call$1","gfU",2,0,null,344],
 $isyo:true,
 static:{"":"ty"}},
 Rd:{
 "":"qh;vl,da",
 KR:[function(a,b,c,d){var z=this.da
 z.toString
-return H.VM(new P.O9(z),[null]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,343,344,345,156],
+return H.VM(new P.O9(z),[null]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,345,346,347,156],
 cO:[function(a){this.vl.cO(0)
 this.da.cO(0)},"call$0","gJK",0,0,107],
 no:function(a){var z=P.Ve(this.gJK(this),null,null,null,!0,null)
@@ -9216,7 +9220,7 @@
 DE:[function(a){if(!!a.$isZ6)return new H.Z6(a.JE,a.Jz)
 if(!!a.$isns)return new H.ns(a.hQ,a.bv,a.Jz)
 throw H.b("Illegal underlying port "+H.d(a))},"call$1","goi",2,0,null,21]},
-Iw:{
+II:{
 "":"AP;RZ",
 Vf:[function(a){var z,y,x,w,v,u
 z=J.U6(a)
@@ -9228,11 +9232,11 @@
 u=v.Zt(w)
 if(u==null)return
 return new H.Z6(u,x)}else return new H.ns(y,w,x)},"call$1","gTm",2,0,null,68]},
-aJ:{
+fP:{
 "":"a;MD",
 t:[function(a,b){return b.__MessageTraverser__attached_info__},"call$1","gIA",2,0,null,6],
 u:[function(a,b,c){this.MD.push(b)
-b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,346],
+b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,348],
 Hn:[function(a){this.MD=[]},"call$0","gb6",0,0,null],
 Xq:[function(){var z,y,x
 for(z=this.MD.length,y=0;y<z;++y){x=this.MD
@@ -9241,7 +9245,7 @@
 X1:{
 "":"a;",
 t:[function(a,b){return},"call$1","gIA",2,0,null,6],
-u:[function(a,b,c){},"call$2","gj3",4,0,null,6,346],
+u:[function(a,b,c){},"call$2","gj3",4,0,null,6,348],
 Hn:[function(a){},"call$0","gb6",0,0,null],
 Xq:[function(){return},"call$0","gt6",0,0,null]},
 HU:{
@@ -9255,10 +9259,10 @@
 if(a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean")return this.Pq(a)
 z=J.x(a)
 if(typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$isList))return this.wb(a)
-if(typeof a==="object"&&a!==null&&!!z.$isL8)return this.TI(a)
+if(typeof a==="object"&&a!==null&&!!z.$isZ0)return this.TI(a)
 if(typeof a==="object"&&a!==null&&!!z.$isbC)return this.DE(a)
-return this.YZ(a)},"call$1","gRQ",2,0,null,21],
-YZ:[function(a){throw H.b("Message serialization: Illegal value "+H.d(a)+" passed")},"call$1","gSG",2,0,null,21]},
+return this.I9(a)},"call$1","gRQ",2,0,null,21],
+I9:[function(a){throw H.b("Message serialization: Illegal value "+H.d(a)+" passed")},"call$1","gSG",2,0,null,21]},
 oo:{
 "":"HU;",
 Pq:[function(a){return a},"call$1","gKz",2,0,null,21],
@@ -9286,7 +9290,7 @@
 return z.a},"call$1","gnM",2,0,null,144],
 DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21]},
 OW:{
-"":"Tp:347;a,b",
+"":"Tp:349;a,b",
 call$2:[function(a,b){var z=this.b
 J.kW(this.a.a,z.I8(a),z.I8(b))},"call$2",null,4,0,null,42,203,"call"],
 $isEH:true},
@@ -9320,7 +9324,7 @@
 DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21]},
 AP:{
 "":"a;",
-QS:[function(a){if(H.uu(a))return a
+QS:[function(a){if(H.ZR(a))return a
 this.RZ=P.Py(null,null,null,null,null)
 return this.XE(a)},"call$1","gia",2,0,null,21],
 XE:[function(a){var z,y
@@ -9342,7 +9346,7 @@
 if(typeof w!=="number")return H.s(w)
 v=0
 for(;v<w;++v)z.u(x,v,this.XE(z.t(x,v)))
-return x},"call$1","gug",2,0,null,21],
+return x},"call$1","gMS",2,0,null,21],
 tv:[function(a){var z,y,x,w,v,u,t,s
 z=P.L5(null,null,null,null,null)
 y=J.U6(a)
@@ -9455,15 +9459,15 @@
 if(typeof y==="string")z=y}x=J.rY(z)
 if(x.j(z,0)===36)z=x.yn(z,1)
 x=H.oX(a)
-return H.d(z)+H.ia(x,0,null)},"call$1","EU",2,0,null,6],
-a5:[function(a){return"Instance of '"+H.lh(a)+"'"},"call$1","bj",2,0,null,6],
+return H.d(z)+H.ia(x,0,null)},"call$1","Ig",2,0,null,6],
+a5:[function(a){return"Instance of '"+H.lh(a)+"'"},"call$1","V8",2,0,null,6],
 mz:[function(){var z,y,x
 if(typeof self!="undefined")return self.location.href
 if(typeof version=="function"&&typeof os=="object"&&"system" in os){z=os.system("pwd")
 y=z.length
 x=y-1
 if(x<0)return H.e(z,x)
-if(z[x]==="\n")z=C.xB.JT(z,0,x)}else z=null
+if(z[x]==="\n")z=C.xB.Nj(z,0,x)}else z=null
 if(typeof version=="function"&&typeof system=="function")z=environment.PWD
 return z!=null?C.xB.g("file://",z)+"/":null},"call$0","y9",0,0,null],
 VK:[function(a){var z,y,x,w,v,u
@@ -9471,7 +9475,7 @@
 for(y=z<=500,x="",w=0;w<z;w+=500){if(y)v=a
 else{u=w+500
 u=u<z?u:z
-v=a.slice(w,u)}x+=String.fromCharCode.apply(null,v)}return x},"call$1","Lb",2,0,null,30],
+v=a.slice(w,u)}x+=String.fromCharCode.apply(null,v)}return x},"call$1","Xr",2,0,null,30],
 Cq:[function(a){var z,y,x
 z=[]
 z.$builtinTypeInfo=[J.im]
@@ -9501,9 +9505,9 @@
 if(x.E(a,0)||x.C(a,100)){w=new Date(y)
 if(h)w.setUTCFullYear(a)
 else w.setFullYear(a)
-return w.valueOf()}return y},"call$8","RK",16,0,null,33,34,35,36,37,38,39,40],
-U8:[function(a){if(a.date===void 0)a.date=new Date(a.y3)
-return a.date},"call$1","on",2,0,null,41],
+return w.valueOf()}return y},"call$8","ny",16,0,null,33,34,35,36,37,38,39,40],
+o2:[function(a){if(a.date===void 0)a.date=new Date(a.y3)
+return a.date},"call$1","j1",2,0,null,41],
 of:[function(a,b){if(a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string")throw H.b(new P.AT(a))
 return a[b]},"call$2","De",4,0,null,6,42],
 aw:[function(a,b,c){if(a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string")throw H.b(new P.AT(a))
@@ -9514,7 +9518,7 @@
 y=[]
 x=[]
 if(b!=null){z.a=0+b.length
-C.Nm.Ay(y,b)}z.b=""
+C.Nm.FV(y,b)}z.b=""
 if(c!=null&&!c.gl0(c))c.aN(0,new H.Cj(z,y,x))
 return J.jf(a,new H.LI(C.Ka,"call$"+z.a+z.b,0,y,x,null))},"call$3","Ro",6,0,null,15,43,44],
 Ek:[function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p
@@ -9527,14 +9531,14 @@
 w=x.Rv
 if(w!==b.length)return H.zo(a,b,c)
 v=P.L5(null,null,null,null,null)
-for(u=x.Ee,t=x.Rn,s=0;s<u;++s){r=s+w
+for(u=x.hG,t=x.Rn,s=0;s<u;++s){r=s+w
 v.u(0,init.metadata[t[r+u+3]],init.metadata[x.BX(0,r)])}z.a=!1
 c.aN(0,new H.u8(z,v))
 if(z.a)return H.zo(a,b,c)
-J.rI(b,v.gUQ(v))
+J.bj(b,v.gUQ(v))
 return y.apply(a,b)}q=[]
 p=0+b.length
-C.Nm.Ay(q,b)
+C.Nm.FV(q,b)
 y=a["call$"+p]
 if(y==null)return H.zo(a,b,c)
 return y.apply(a,q)},"call$3","ra",6,0,null,15,43,44],
@@ -9544,7 +9548,7 @@
 if(a=="num")return C.oD
 if(a=="bool")return C.Fm
 if(a=="List")return C.l0
-return init.allClasses[a]},"call$1","aC",2,0,null,45],
+return init.allClasses[a]},"call$1","Tg",2,0,null,45],
 Pq:[function(){var z={x:0}
 delete z.x
 return z},"call$0","vg",0,0,null],
@@ -9568,7 +9572,7 @@
 z.name=""}else z.toString=H.Ju
 throw z},"call$1","xE",2,0,null,48],
 Ru:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
-z=new H.Hk(a)
+z=new H.Am(a)
 if(a==null)return
 if(typeof a!=="object")return a
 if("dartException" in a)return z.call$1(a.dartException)
@@ -9578,7 +9582,7 @@
 w=x&65535
 if((C.jn.GG(x,16)&8191)===10)switch(w){case 438:return z.call$1(H.T3(H.d(y)+" (Error "+w+")",null))
 case 445:case 5007:v=H.d(y)+" (Error "+w+")"
-return z.call$1(new H.ZQ(v,null))
+return z.call$1(new H.W0(v,null))
 default:}}if(a instanceof TypeError){v=$.WD()
 u=$.OI()
 t=$.PH()
@@ -9603,7 +9607,7 @@
 if(m==null){m=n.qS(y)
 v=m!=null}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0
 if(v){v=m==null?null:m.method
-return z.call$1(new H.ZQ(y,v))}}}v=typeof y==="string"?y:""
+return z.call$1(new H.W0(y,v))}}}v=typeof y==="string"?y:""
 return z.call$1(new H.vV(v))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.VS()
 return z.call$1(new P.AT(null))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.VS()
 return a},"call$1","v2",2,0,null,48],
@@ -9670,14 +9674,14 @@
 z=a.length
 if(typeof dart_precompiled=="function")return H.vq(z,a)
 else if(z===0){y=$.mJ
-if(y==null){y=H.E2("self")
+if(y==null){y=H.B3("self")
 $.mJ=y}y="return function(){return F.call(this."+H.d(y)+");"
 x=$.OK
 $.OK=J.WB(x,1)
 return new Function("F",y+H.d(x)+"}")(a)}else if(1<=z&&z<27){w="abcdefghijklmnopqrstuvwxyz".split("").splice(0,z).join(",")
 y="return function("+w+"){return F.call(this."
 x=$.mJ
-if(x==null){x=H.E2("self")
+if(x==null){x=H.B3("self")
 $.mJ=x}x=y+H.d(x)+","+w+");"
 y=$.OK
 $.OK=J.WB(y,1)
@@ -9709,13 +9713,13 @@
 c.fixed$length=init
 return H.iA(a,b,c,!!d,e,f)},"call$6","Rz",12,0,null,41,59,60,61,62,12],
 SE:[function(a,b){var z=J.U6(b)
-throw H.b(H.aq(H.lh(a),z.JT(b,3,z.gB(b))))},"call$2","H7",4,0,null,23,66],
+throw H.b(H.aq(H.lh(a),z.Nj(b,3,z.gB(b))))},"call$2","H7",4,0,null,23,66],
 Go:[function(a,b){var z
 if(a!=null)z=typeof a==="object"&&J.x(a)[b]
 else z=!0
 if(z)return a
 H.SE(a,b)},"call$2","SR",4,0,null,23,66],
-ag:[function(a){throw H.b(P.Gz("Cyclic initialization for static "+H.d(a)))},"call$1","l5",2,0,null,67],
+ag:[function(a){throw H.b(P.Gz("Cyclic initialization for static "+H.d(a)))},"call$1","RK",2,0,null,67],
 KT:[function(a,b,c){return new H.tD(a,b,c,null)},"call$3","HN",6,0,null,69,70,71],
 Og:[function(a,b){var z=a.name
 if(b==null||b.length===0)return new H.tu(z)
@@ -9726,7 +9730,7 @@
 return a},"call$2","aa",4,0,null,74,75],
 oX:[function(a){if(a==null)return
 return a.$builtinTypeInfo},"call$1","Qn",2,0,null,74],
-IM:[function(a,b){return H.Y9(a["$as"+H.d(b)],H.oX(a))},"call$2","PE",4,0,null,74,76],
+IM:[function(a,b){return H.Y9(a["$as"+H.d(b)],H.oX(a))},"call$2","JW",4,0,null,74,76],
 ip:[function(a,b,c){var z=H.IM(a,b)
 return z==null?null:z[c]},"call$3","Cn",6,0,null,74,76,47],
 Kp:[function(a,b){var z=H.oX(a)
@@ -9766,7 +9770,7 @@
 return!0},"call$2","QY",4,0,null,86,87],
 IG:[function(a,b,c){return H.ml(a,b,H.IM(b,c))},"call$3","k2",6,0,null,88,89,90],
 Gq:[function(a,b){var z,y
-if(a==null)return b==null||b.builtin$cls==="a"||b.builtin$cls==="CD"
+if(a==null)return b==null||b.builtin$cls==="a"||b.builtin$cls==="PE"
 if(b==null)return!0
 z=H.oX(a)
 a=J.x(a)
@@ -9811,7 +9815,7 @@
 if(!Object.hasOwnProperty.call(a,w))return!1
 v=b[w]
 u=a[w]
-if(!(H.t1(v,u)||H.t1(u,v)))return!1}return!0},"call$2","WZ",4,0,null,86,87],
+if(!(H.t1(v,u)||H.t1(u,v)))return!1}return!0},"call$2","oq",4,0,null,86,87],
 Ly:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
 if(!("func" in a))return!1
 if("void" in a){if(!("void" in b)&&"ret" in b)return!1}else if(!("void" in b)){z=a.ret
@@ -9834,7 +9838,7 @@
 if(!(H.t1(o,n)||H.t1(n,o)))return!1}for(m=0;m<q;++l,++m){o=v[l]
 n=u[m]
 if(!(H.t1(o,n)||H.t1(n,o)))return!1}}return H.Vt(a.named,b.named)},"call$2","Sj",4,0,null,86,87],
-ml:[function(a,b,c){return a.apply(b,c)},"call$3","fW",6,0,null,15,41,82],
+ml:[function(a,b,c){return a.apply(b,c)},"call$3","Ey",6,0,null,15,41,82],
 uc:[function(a){var z=$.NF
 return"Instance of "+(z==null?"<Unknown>":z.call$1(a))},"call$1","zB",2,0,null,93],
 Su:[function(a){return H.eQ(a)},"call$1","cx",2,0,null,6],
@@ -9937,7 +9941,7 @@
 v.lastIndex=0
 return a.replace(v,c.replace("$","$$$$"))}else{if(b==null)H.vh(new P.AT(null))
 throw H.b("String.replaceAll(Pattern) UNIMPLEMENTED")}}},"call$3","eY",6,0,null,41,105,106],
-XB:{
+Zd:{
 "":"a;"},
 xQ:{
 "":"a;"},
@@ -9952,11 +9956,11 @@
 u:[function(a,b,c){return this.Ix()},"call$2","gj3",4,0,null,42,203],
 Rz:[function(a,b){return this.Ix()},"call$1","gRI",2,0,null,42],
 V1:[function(a){return this.Ix()},"call$0","gyP",0,0,null],
-Ay:[function(a,b){return this.Ix()},"call$1","gDY",2,0,null,104],
-$isL8:true},
+FV:[function(a,b){return this.Ix()},"call$1","gDY",2,0,null,104],
+$isZ0:true},
 LPe:{
 "":"oH;B>,eZ,tc",
-PF:[function(a){return this.gUQ(this).Vr(0,new H.bw(this,a))},"call$1","gmc",2,0,null,102],
+di:[function(a){return this.gUQ(this).Vr(0,new H.bw(this,a))},"call$1","gmc",2,0,null,102],
 x4:[function(a){if(typeof a!=="string")return!1
 if(a==="__proto__")return!1
 return this.eZ.hasOwnProperty(a)},"call$1","gV9",2,0,null,42],
@@ -9989,7 +9993,7 @@
 z=this.lK
 y=J.x(z)
 if(typeof z==="object"&&z!==null&&!!y.$iswv)return z
-x=$.rS().t(0,z)
+x=$.bx().t(0,z)
 if(x!=null){y=J.Gn(x,":")
 if(0>=y.length)return H.e(y,0)
 z=y[0]}y=new H.GD(z)
@@ -10036,54 +10040,54 @@
 else z=null}s=!0}else s=!1
 if(typeof u=="function"){if(!("$reflectable" in u))H.Hz(J.GL(this.gWa()))
 if(s)return new H.IW(H.zh(u),u,x,z)
-else return new H.A2(u,x,z)}else return new H.F3(z)},"call$1","gLk",2,0,null,6],
+else return new H.Ny(u,x,z)}else return new H.F3(z)},"call$1","gLk",2,0,null,6],
 static:{"":"hAw,oY,pB"}},
-A2:{
+Ny:{
 "":"a;mr,eK,Ot",
 gpf:function(){return!1},
 Bj:[function(a,b){var z,y
 if(!this.eK){if(typeof b!=="object"||b===null||b.constructor!==Array)b=P.F(b,!0,null)
 z=a}else{y=[a]
-C.Nm.Ay(y,b)
+C.Nm.FV(y,b)
 z=this.Ot
 z=z!=null?z:a
 b=y}return this.mr.apply(z,b)},"call$2","gUT",4,0,null,140,82]},
 IW:{
-"":"A2;qa,mr,eK,Ot",
+"":"Ny;qa,mr,eK,Ot",
 To:function(a){return this.qa.call$1(a)},
 Bj:[function(a,b){var z,y,x,w,v,u,t
 if(!this.eK){if(typeof b!=="object"||b===null||b.constructor!==Array)b=P.F(b,!0,null)
 z=J.q8(b)
 y=a}else{x=[a]
-C.Nm.Ay(x,b)
+C.Nm.FV(x,b)
 y=this.Ot
 y=y!=null?y:a
 z=x.length-1
 b=x}w=this.qa
 v=w.Rv
-u=v+w.Ee
-if(w.Mo&&z>v)throw H.b(H.WE("Invocation of unstubbed method '"+w.gJw()+"' with "+J.q8(b)+" arguments."))
-else if(z<v)throw H.b(H.WE("Invocation of unstubbed method '"+w.gJw()+"' with "+z+" arguments (too few)."))
-else if(z>u)throw H.b(H.WE("Invocation of unstubbed method '"+w.gJw()+"' with "+z+" arguments (too many)."))
+u=v+w.hG
+if(w.Mo&&z>v)throw H.b(H.WE("Invocation of unstubbed method '"+w.gx5()+"' with "+J.q8(b)+" arguments."))
+else if(z<v)throw H.b(H.WE("Invocation of unstubbed method '"+w.gx5()+"' with "+z+" arguments (too few)."))
+else if(z>u)throw H.b(H.WE("Invocation of unstubbed method '"+w.gx5()+"' with "+z+" arguments (too many)."))
 for(v=J.w1(b),t=z;t<u;++t)v.h(b,init.metadata[w.BX(0,t)])
 return this.mr.apply(y,b)},"call$2","gUT",4,0,null,140,82]},
 F3:{
 "":"a;e0?",
 gpf:function(){return!0},
 Bj:[function(a,b){var z=this.e0
-return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,330]},
+return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,332]},
 FD:{
-"":"a;mr,Rn>,XZ,Rv,Ee,Mo,AM",
+"":"a;mr,Rn>,XZ,Rv,hG,Mo,AM",
 BX:[function(a,b){var z=this.Rv
 if(b<z)return
-return this.Rn[3+b-z]},"call$1","gkv",2,0,null,348],
+return this.Rn[3+b-z]},"call$1","gkv",2,0,null,350],
 hl:[function(a){var z,y
 z=this.AM
 if(typeof z=="number")return init.metadata[z]
 else if(typeof z=="function"){y=new a()
 H.VM(y,y["<>"])
-return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,349],
-gJw:function(){return this.mr.$reflectionName},
+return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,351],
+gx5:function(){return this.mr.$reflectionName},
 static:{"":"t4,FV,C1,mr",zh:function(a){var z,y,x,w
 z=a.$reflectionInfo
 if(z==null)return
@@ -10094,7 +10098,7 @@
 w=z[1]
 return new H.FD(a,z,(y&1)===1,x,w>>1,(w&1)===1,z[2])}}},
 Cj:{
-"":"Tp:350;a,b,c",
+"":"Tp:352;a,b,c",
 call$2:[function(a,b){var z=this.a
 z.b=z.b+"$"+H.d(a)
 this.c.push(a)
@@ -10102,10 +10106,10 @@
 z.a=z.a+1},"call$2",null,4,0,null,12,46,"call"],
 $isEH:true},
 u8:{
-"":"Tp:350;a,b",
+"":"Tp:352;a,b",
 call$2:[function(a,b){var z=this.b
 if(z.x4(a))z.u(0,a,b)
-else this.a.a=!0},"call$2",null,4,0,null,348,23,"call"],
+else this.a.a=!0},"call$2",null,4,0,null,350,23,"call"],
 $isEH:true},
 Zr:{
 "":"a;bT,rq,Xs,Fa,Ga,EP",
@@ -10124,7 +10128,7 @@
 x=this.EP
 if(x!==-1)y.receiver=z[x+1]
 return y},"call$1","gul",2,0,null,20],
-static:{"":"lm,k1,Re,fN,qi,rZ,BX,tt,dt,A7",cM:[function(a){var z,y,x,w,v,u
+static:{"":"lm,k1,Re,fN,qi,rZ,BX,tt,dt,A7",LX:[function(a){var z,y,x,w,v,u
 a=a.replace(String({}), '$receiver$').replace(new RegExp("[[\\]{}()*+?.\\\\^$|]",'g'),'\\$&')
 z=a.match(/\\\$[a-zA-Z]+\\\$/g)
 if(z==null)z=[]
@@ -10133,7 +10137,7 @@
 w=z.indexOf("\\$expr\\$")
 v=z.indexOf("\\$method\\$")
 u=z.indexOf("\\$receiver\\$")
-return new H.Zr(a.replace('\\$arguments\\$','((?:x|[^x])*)').replace('\\$argumentsExpr\\$','((?:x|[^x])*)').replace('\\$expr\\$','((?:x|[^x])*)').replace('\\$method\\$','((?:x|[^x])*)').replace('\\$receiver\\$','((?:x|[^x])*)'),y,x,w,v,u)},"call$1","uN",2,0,null,20],S7:[function(a){return function($expr$) {
+return new H.Zr(a.replace('\\$arguments\\$','((?:x|[^x])*)').replace('\\$argumentsExpr\\$','((?:x|[^x])*)').replace('\\$expr\\$','((?:x|[^x])*)').replace('\\$method\\$','((?:x|[^x])*)').replace('\\$receiver\\$','((?:x|[^x])*)'),y,x,w,v,u)},"call$1","dx",2,0,null,20],S7:[function(a){return function($expr$) {
   var $argumentsExpr$ = '$arguments$'
   try {
     $expr$.$method$($argumentsExpr$);
@@ -10147,21 +10151,21 @@
     return e.message;
   }
 }(a)},"call$1","cl",2,0,null,49]}},
-ZQ:{
-"":"Ge;V7,Ga",
+W0:{
+"":"Ge;K9,Ga",
 bu:[function(a){var z=this.Ga
-if(z==null)return"NullError: "+H.d(this.V7)
+if(z==null)return"NullError: "+H.d(this.K9)
 return"NullError: Cannot call \""+H.d(z)+"\" on null"},"call$0","gXo",0,0,null],
 $ismp:true,
 $isGe:true},
 az:{
-"":"Ge;V7,Ga,EP",
+"":"Ge;K9,Ga,EP",
 bu:[function(a){var z,y
 z=this.Ga
-if(z==null)return"NoSuchMethodError: "+H.d(this.V7)
+if(z==null)return"NoSuchMethodError: "+H.d(this.K9)
 y=this.EP
-if(y==null)return"NoSuchMethodError: Cannot call \""+z+"\" ("+H.d(this.V7)+")"
-return"NoSuchMethodError: Cannot call \""+z+"\" on \""+y+"\" ("+H.d(this.V7)+")"},"call$0","gXo",0,0,null],
+if(y==null)return"NoSuchMethodError: Cannot call \""+z+"\" ("+H.d(this.K9)+")"
+return"NoSuchMethodError: Cannot call \""+z+"\" on \""+y+"\" ("+H.d(this.K9)+")"},"call$0","gXo",0,0,null],
 $ismp:true,
 $isGe:true,
 static:{T3:function(a,b){var z,y
@@ -10170,10 +10174,10 @@
 z=z?null:b.receiver
 return new H.az(a,y,z)}}},
 vV:{
-"":"Ge;V7",
-bu:[function(a){var z=this.V7
+"":"Ge;K9",
+bu:[function(a){var z=this.K9
 return C.xB.gl0(z)?"Error":"Error: "+z},"call$0","gXo",0,0,null]},
-Hk:{
+Am:{
 "":"Tp:229;a",
 call$1:[function(a){var z=J.x(a)
 if(typeof a==="object"&&a!==null&&!!z.$isGe)if(a.$thrownJsError==null)a.$thrownJsError=this.a
@@ -10231,16 +10235,16 @@
 return(y^H.eQ(this.jm))>>>0},
 $isv:true,
 static:{"":"mJ,P4",eZ:[function(a){return a.gnw()},"call$1","PR",2,0,null,52],yS:[function(a){return a.EP},"call$1","h0",2,0,null,52],oN:[function(){var z=$.mJ
-if(z==null){z=H.E2("self")
-$.mJ=z}return z},"call$0","rp",0,0,null],Wz:[function(){var z=$.P4
-if(z==null){z=H.E2("receiver")
-$.P4=z}return z},"call$0","TT",0,0,null],E2:[function(a){var z,y,x,w,v
+if(z==null){z=H.B3("self")
+$.mJ=z}return z},"call$0","uT",0,0,null],Wz:[function(){var z=$.P4
+if(z==null){z=H.B3("receiver")
+$.P4=z}return z},"call$0","TT",0,0,null],B3:[function(a){var z,y,x,w,v
 z=new H.v("self","target","receiver","name")
 y=Object.getOwnPropertyNames(z)
 y.fixed$length=init
 x=y
 for(y=x.length,w=0;w<y;++w){v=x[w]
-if(z[v]===a)return v}},"call$1","qg",2,0,null,65]}},
+if(z[v]===a)return v}},"call$1","ec",2,0,null,65]}},
 Ll:{
 "":"a;Jy"},
 dN:{
@@ -10294,11 +10298,11 @@
 for(y=t.length,w=!1,v=0;v<y;++v,w=!0){s=t[v]
 if(w)x+=", "
 x+=H.d(z[s].za())+" "+s}x+="}"}}return x+(") -> "+H.d(this.dw))},"call$0","gXo",0,0,null],
-static:{"":"UA",Dz:[function(a){var z,y,x
+static:{"":"Ot",Dz:[function(a){var z,y,x
 a=a
 z=[]
 for(y=a.length,x=0;x<y;++x)z.push(a[x].za())
-return z},"call$1","eL",2,0,null,68]}},
+return z},"call$1","At",2,0,null,68]}},
 hJ:{
 "":"lb;",
 bu:[function(a){return"dynamic"},"call$0","gXo",0,0,null],
@@ -10326,8 +10330,8 @@
 return y},"call$0","gpA",0,0,null],
 bu:[function(a){return this.oc+"<"+J.XS(this.re,", ")+">"},"call$0","gXo",0,0,null]},
 Zz:{
-"":"Ge;V7",
-bu:[function(a){return"Unsupported operation: "+this.V7},"call$0","gXo",0,0,null],
+"":"Ge;K9",
+bu:[function(a){return"Unsupported operation: "+this.K9},"call$0","gXo",0,0,null],
 $ismp:true,
 $isGe:true,
 static:{WE:function(a){return new H.Zz(a)}}},
@@ -10355,7 +10359,7 @@
 call$1:[function(a){return this.a(a)},"call$1",null,2,0,null,91,"call"],
 $isEH:true},
 wN:{
-"":"Tp:351;b",
+"":"Tp:353;b",
 call$2:[function(a,b){return this.b(a,b)},"call$2",null,4,0,null,91,94,"call"],
 $isEH:true},
 VX:{
@@ -10380,11 +10384,11 @@
 if(typeof a!=="string")H.vh(new P.AT(a))
 z=this.Ej.exec(a)
 if(z==null)return
-return H.yx(this,z)},"call$1","gvz",2,0,null,338],
+return H.yx(this,z)},"call$1","gvz",2,0,null,340],
 zD:[function(a){if(typeof a!=="string")H.vh(new P.AT(a))
-return this.Ej.test(a)},"call$1","guf",2,0,null,338],
+return this.Ej.test(a)},"call$1","guf",2,0,null,340],
 dd:[function(a,b){if(typeof b!=="string")H.vh(new P.AT(b))
-return new H.KW(this,b)},"call$1","gYv",2,0,null,338],
+return new H.KW(this,b)},"call$1","gYv",2,0,null,340],
 yk:[function(a,b){var z,y
 z=this.gF4()
 z.lastIndex=b
@@ -10407,7 +10411,7 @@
 if(typeof z!=="number")return H.s(z)
 z=c>z}else z=!0
 if(z)throw H.b(P.TE(c,0,J.q8(b)))
-return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,334,26,115],
+return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,336,26,115],
 $isVR:true,
 $iscT:true,
 static:{v4:[function(a,b,c,d){var z,y,x,w,v
@@ -10435,8 +10439,7 @@
 $ascX:function(){return[P.Od]}},
 Pb:{
 "":"a;VV,rv,Wh",
-gl:function(a){return this.Wh},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.Wh},
 G:[function(){var z,y,x
 if(this.rv==null)return!1
 z=this.Wh
@@ -10454,17 +10457,17 @@
 tQ:{
 "":"a;M,J9,zO",
 t:[function(a,b){if(!J.de(b,0))H.vh(P.N(b))
-return this.zO},"call$1","gIA",2,0,null,352],
+return this.zO},"call$1","gIA",2,0,null,354],
 $isOd:true}}],["app_bootstrap","index.html_bootstrap.dart",,E,{
 "":"",
-QL:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/navigation_bar_isolate.dart","package:observatory/src/observatory_elements/navigation_bar.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","index.html.0.dart"]
+QL:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_frame.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/navigation_bar_isolate.dart","package:observatory/src/observatory_elements/navigation_bar.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","main.dart"]
 $.uP=!1
-A.Ok()},"call$0","Im",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
+F.E2()},"call$0","Im",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
 "":"",
 G6:{
-"":["Vf;eE%-353,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-grs:[function(a){return a.eE},null,null,1,0,356,"msg",357,358],
-srs:[function(a,b){a.eE=this.ct(a,C.UX,a.eE,b)},null,null,3,0,359,23,"msg",357],
+"":["Vf;eE%-355,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+grs:[function(a){return a.eE},null,null,1,0,358,"msg",359,360],
+srs:[function(a,b){a.eE=this.ct(a,C.UX,a.eE,b)},null,null,3,0,361,23,"msg",359],
 "@":function(){return[C.PT]},
 static:{Dw:[function(a){var z,y,x,w,v
 z=H.B7([],P.L5(null,null,null,null,null))
@@ -10475,19 +10478,19 @@
 v=W.cv
 v=H.VM(new V.qC(P.Py(null,null,null,w,v),null,null),[w,v])
 a.eE=z
-a.Pd=y
-a.yS=x
-a.OM=v
+a.SO=y
+a.B7=x
+a.ZQ=v
 C.J0.ZL(a)
 C.J0.oX(a)
 return a},null,null,0,0,108,"new BreakpointListElement$created" /* new BreakpointListElement$created:0:0 */]}},
-"+BreakpointListElement":[360],
+"+BreakpointListElement":[362],
 Vf:{
 "":"uL+Pi;",
 $isd3:true}}],["class_ref_element","package:observatory/src/observatory_elements/class_ref.dart",,Q,{
 "":"",
-Tg:{
-"":["xI;tY-353,Pe-361,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+kf:{
+"":["xI;tY-355,Pe-363,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
 "@":function(){return[C.OS]},
 static:{rt:[function(a){var z,y,x,w
 z=$.Nd()
@@ -10496,18 +10499,18 @@
 w=W.cv
 w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
 a.Pe=!1
-a.Pd=z
-a.yS=y
-a.OM=w
+a.SO=z
+a.B7=y
+a.ZQ=w
 C.YZ.ZL(a)
 C.YZ.oX(a)
 return a},null,null,0,0,108,"new ClassRefElement$created" /* new ClassRefElement$created:0:0 */]}},
-"+ClassRefElement":[362]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
+"+ClassRefElement":[364]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
 "":"",
-Bh:{
-"":["pv;lb%-353,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gRu:[function(a){return a.lb},null,null,1,0,356,"cls",357,358],
-sRu:[function(a,b){a.lb=this.ct(a,C.XA,a.lb,b)},null,null,3,0,359,23,"cls",357],
+Ps:{
+"":["pv;F0%-355,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRu:[function(a){return a.F0},null,null,1,0,358,"cls",359,360],
+sRu:[function(a,b){a.F0=this.ct(a,C.XA,a.F0,b)},null,null,3,0,361,23,"cls",359],
 "@":function(){return[C.aQ]},
 static:{zg:[function(a){var z,y,x,w
 z=$.Nd()
@@ -10515,20 +10518,20 @@
 x=J.O
 w=W.cv
 w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
-a.Pd=z
-a.yS=y
-a.OM=w
+a.SO=z
+a.B7=y
+a.ZQ=w
 C.kk.ZL(a)
 C.kk.oX(a)
 return a},null,null,0,0,108,"new ClassViewElement$created" /* new ClassViewElement$created:0:0 */]}},
-"+ClassViewElement":[363],
+"+ClassViewElement":[365],
 pv:{
 "":"uL+Pi;",
 $isd3:true}}],["code_ref_element","package:observatory/src/observatory_elements/code_ref.dart",,O,{
 "":"",
 CN:{
-"":["xI;tY-353,Pe-361,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-"@":function(){return[C.H3]},
+"":["xI;tY-355,Pe-363,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"@":function(){return[C.U8]},
 static:{On:[function(a){var z,y,x,w
 z=$.Nd()
 y=P.Py(null,null,null,J.O,W.I0)
@@ -10536,19 +10539,19 @@
 w=W.cv
 w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
 a.Pe=!1
-a.Pd=z
-a.yS=y
-a.OM=w
+a.SO=z
+a.B7=y
+a.ZQ=w
 C.IK.ZL(a)
 C.IK.oX(a)
 return a},null,null,0,0,108,"new CodeRefElement$created" /* new CodeRefElement$created:0:0 */]}},
-"+CodeRefElement":[362]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
+"+CodeRefElement":[364]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
 "":"",
-Qv:{
-"":["Vfx;eJ%-364,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtT:[function(a){return a.eJ},null,null,1,0,365,"code",357,358],
-stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,366,23,"code",357],
-gtgn:[function(a){return"panel panel-success"},null,null,1,0,367,"cssPanelClass"],
+vc:{
+"":["Vfx;eJ%-366,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtT:[function(a){return a.eJ},null,null,1,0,367,"code",359,360],
+stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,368,23,"code",359],
+gtgn:[function(a){return"panel panel-success"},null,null,1,0,369,"cssPanelClass"],
 "@":function(){return[C.xW]},
 static:{Fe:[function(a){var z,y,x,w
 z=$.Nd()
@@ -10556,31 +10559,31 @@
 x=J.O
 w=W.cv
 w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
-a.Pd=z
-a.yS=y
-a.OM=w
+a.SO=z
+a.B7=y
+a.ZQ=w
 C.YD.ZL(a)
 C.YD.oX(a)
 return a},null,null,0,0,108,"new CodeViewElement$created" /* new CodeViewElement$created:0:0 */]}},
-"+CodeViewElement":[368],
+"+CodeViewElement":[370],
 Vfx:{
 "":"uL+Pi;",
 $isd3:true}}],["collapsible_content_element","package:observatory/src/observatory_elements/collapsible_content.dart",,R,{
 "":"",
 i6:{
-"":["Dsd;zh%-369,HX%-369,Uy%-361,AP,fn,hm-354,AP,fn,AP,fn,Ox,Ob,Om,vW,Rr,Pd,yS,OM-355",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gbJ:[function(a){return a.zh},null,null,1,0,367,"iconClass",357,370],
-sbJ:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,"iconClass",357],
-gvu:[function(a){return a.HX},null,null,1,0,367,"displayValue",357,370],
-svu:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,"displayValue",357],
-gxj:[function(a){return a.Uy},null,null,1,0,371,"collapsed"],
+"":["Dsd;zh%-371,HX%-371,Uy%-363,AP,fn,hm-356,AP,fn,AP,fn,wV,Sa,Uk,oq,Wz,SO,B7,ZQ-357",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gl7:[function(a){return a.zh},null,null,1,0,369,"iconClass",359,372],
+sl7:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,"iconClass",359],
+gai:[function(a){return a.HX},null,null,1,0,369,"displayValue",359,372],
+sai:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,"displayValue",359],
+gxj:[function(a){return a.Uy},null,null,1,0,373,"collapsed"],
 sxj:[function(a,b){a.Uy=b
-this.SS(a)},null,null,3,0,372,373,"collapsed"],
+this.SS(a)},null,null,3,0,374,375,"collapsed"],
 i4:[function(a){Z.uL.prototype.i4.call(this,a)
 this.SS(a)},"call$0","gQd",0,0,107,"enteredView"],
 jp:[function(a,b,c,d){a.Uy=a.Uy!==!0
 this.SS(a)
-this.SS(a)},"call$3","gl8",6,0,374,18,305,74,"toggleDisplay"],
+this.SS(a)},"call$3","gl8",6,0,376,18,307,74,"toggleDisplay"],
 SS:[function(a){var z,y
 z=a.Uy
 y=a.zh
@@ -10588,7 +10591,7 @@
 a.HX=this.ct(a,C.Jw,a.HX,"none")}else{a.zh=this.ct(a,C.Di,y,"glyphicon glyphicon-chevron-up")
 a.HX=this.ct(a,C.Jw,a.HX,"block")}},"call$0","glg",0,0,107,"_refresh"],
 "@":function(){return[C.Gu]},
-static:{"":"Vl<-369,DI<-369",ef:[function(a){var z,y,x,w
+static:{"":"Vl<-371,DI<-371",Hv:[function(a){var z,y,x,w
 z=$.Nd()
 y=P.Py(null,null,null,J.O,W.I0)
 x=J.O
@@ -10597,19 +10600,19 @@
 a.zh="glyphicon glyphicon-chevron-down"
 a.HX="none"
 a.Uy=!0
-a.Pd=z
-a.yS=y
-a.OM=w
+a.SO=z
+a.B7=y
+a.ZQ=w
 C.j8.ZL(a)
 C.j8.oX(a)
 return a},null,null,0,0,108,"new CollapsibleContentElement$created" /* new CollapsibleContentElement$created:0:0 */]}},
-"+CollapsibleContentElement":[375],
+"+CollapsibleContentElement":[377],
 Dsd:{
 "":"uL+Pi;",
 $isd3:true}}],["custom_element.polyfill","package:custom_element/polyfill.dart",,B,{
 "":"",
 G9:function(){var z,y
-z=$.LX()
+z=$.cM()
 if(z==null)return!0
 y=J.UQ(z,"CustomElements")
 if(y==null)return"register" in document
@@ -10619,7 +10622,7 @@
 call$0:[function(){if(B.G9()){var z=H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[null])
 z.L7(null,null)
 return z}z=H.VM(new W.RO(document,"WebComponentsReady",!1),[null])
-return z.gFV(z)},"call$0",null,0,0,null,"call"],
+return z.gtH(z)},"call$0",null,0,0,null,"call"],
 $isEH:true}}],["dart._internal","dart:_internal",,H,{
 "":"",
 bQ:[function(a,b){var z
@@ -10629,7 +10632,7 @@
 return!1},"call$2","cs",4,0,null,109,110],
 n3:[function(a,b,c){var z
 for(z=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);z.G();)b=c.call$2(b,z.lo)
-return b},"call$3","tf",6,0,null,109,111,112],
+return b},"call$3","hp",6,0,null,109,111,112],
 mx:[function(a,b,c){var z,y,x
 for(y=0;x=$.RM(),y<x.length;++y)if(x[y]===a)return H.d(b)+"..."+H.d(c)
 z=P.p9("")
@@ -10649,7 +10652,7 @@
 if(J.de(z,0))return
 y=J.Wx(e)
 if(y.C(e,0))throw H.b(new P.AT(e))
-if(J.xZ(y.g(e,z),J.q8(d)))throw H.b(P.w("Not enough elements"))
+if(J.z8(y.g(e,z),J.q8(d)))throw H.b(P.w("Not enough elements"))
 H.Gj(d,e,a,b,z)},"call$5","it",10,0,null,68,115,116,105,117],
 IC:[function(a,b,c){var z,y,x,w,v,u
 z=J.Wx(b)
@@ -10669,7 +10672,7 @@
 Gj:[function(a,b,c,d,e){var z,y,x,w,v
 z=J.Wx(b)
 if(z.C(b,d))for(y=J.xH(z.g(b,e),1),x=J.xH(J.WB(d,e),1),z=J.U6(a);w=J.Wx(y),w.F(y,b);y=w.W(y,1),x=J.xH(x,1))C.Nm.u(c,x,z.t(a,y))
-else for(w=J.U6(a),x=d,y=b;v=J.Wx(y),v.C(y,z.g(b,e));y=v.g(y,1),x=J.WB(x,1))C.Nm.u(c,x,w.t(a,y))},"call$5","hf",10,0,null,118,119,120,121,122],
+else for(w=J.U6(a),x=d,y=b;v=J.Wx(y),v.C(y,z.g(b,e));y=v.g(y,1),x=J.WB(x,1))C.Nm.u(c,x,w.t(a,y))},"call$5","E9",10,0,null,118,119,120,121,122],
 Ri:[function(a,b,c,d){var z
 if(c>=a.length)return-1
 for(z=c;z<d;++z){if(z>=a.length)return H.e(a,z)
@@ -10687,7 +10690,7 @@
 for(z=J.WB(b,1),y=J.U6(a);x=J.Wx(z),x.E(z,c);z=x.g(z,1)){w=y.t(a,z)
 v=z
 while(!0){u=J.Wx(v)
-if(!(u.D(v,b)&&J.xZ(d.call$2(y.t(a,u.W(v,1)),w),0)))break
+if(!(u.D(v,b)&&J.z8(d.call$2(y.t(a,u.W(v,1)),w),0)))break
 y.u(a,v,y.t(a,u.W(v,1)))
 v=u.W(v,1)}y.u(a,v,w)}},"call$4","aH",8,0,null,123,126,127,128],
 d4:[function(a,b,a0,a1){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c
@@ -10706,23 +10709,23 @@
 o=t.t(a,u)
 n=t.t(a,r)
 m=t.t(a,v)
-if(J.xZ(a1.call$2(q,p),0)){l=p
+if(J.z8(a1.call$2(q,p),0)){l=p
 p=q
-q=l}if(J.xZ(a1.call$2(n,m),0)){l=m
+q=l}if(J.z8(a1.call$2(n,m),0)){l=m
 m=n
-n=l}if(J.xZ(a1.call$2(q,o),0)){l=o
+n=l}if(J.z8(a1.call$2(q,o),0)){l=o
 o=q
-q=l}if(J.xZ(a1.call$2(p,o),0)){l=o
+q=l}if(J.z8(a1.call$2(p,o),0)){l=o
 o=p
-p=l}if(J.xZ(a1.call$2(q,n),0)){l=n
+p=l}if(J.z8(a1.call$2(q,n),0)){l=n
 n=q
-q=l}if(J.xZ(a1.call$2(o,n),0)){l=n
+q=l}if(J.z8(a1.call$2(o,n),0)){l=n
 n=o
-o=l}if(J.xZ(a1.call$2(p,m),0)){l=m
+o=l}if(J.z8(a1.call$2(p,m),0)){l=m
 m=p
-p=l}if(J.xZ(a1.call$2(p,o),0)){l=o
+p=l}if(J.z8(a1.call$2(p,o),0)){l=o
 o=p
-p=l}if(J.xZ(a1.call$2(n,m),0)){l=m
+p=l}if(J.z8(a1.call$2(n,m),0)){l=m
 m=n
 n=l}t.u(a,w,q)
 t.u(a,u,o)
@@ -10753,7 +10756,7 @@
 j=d
 break}}}}c=!0}else{for(i=k;z=J.Wx(i),z.E(i,j);i=z.g(i,1)){h=t.t(a,i)
 if(J.u6(a1.call$2(h,p),0)){if(!z.n(i,k)){t.u(a,i,t.t(a,k))
-t.u(a,k,h)}k=J.WB(k,1)}else if(J.xZ(a1.call$2(h,n),0))for(;!0;)if(J.xZ(a1.call$2(t.t(a,j),n),0)){j=J.xH(j,1)
+t.u(a,k,h)}k=J.WB(k,1)}else if(J.z8(a1.call$2(h,n),0))for(;!0;)if(J.z8(a1.call$2(t.t(a,j),n),0)){j=J.xH(j,1)
 if(J.u6(j,i))break
 continue}else{x=J.Wx(j)
 if(J.u6(a1.call$2(t.t(a,j),p),0)){t.u(a,i,t.t(a,k))
@@ -10790,7 +10793,7 @@
 k=e}else{t.u(a,i,t.t(a,j))
 d=x.W(j,1)
 t.u(a,j,h)
-j=d}break}}H.ZE(a,k,j,a1)}else H.ZE(a,k,j,a1)},"call$4","VI",8,0,null,123,126,127,128],
+j=d}break}}H.ZE(a,k,j,a1)}else H.ZE(a,k,j,a1)},"call$4","Hm",8,0,null,123,126,127,128],
 aL:{
 "":"mW;",
 gA:function(a){return H.VM(new H.a7(this,this.gB(this),0,null),[H.ip(this,"aL",0)])},
@@ -10799,7 +10802,7 @@
 if(typeof z!=="number")return H.s(z)
 y=0
 for(;y<z;++y){b.call$1(this.Zv(0,y))
-if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,376],
+if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378],
 gl0:function(a){return J.de(this.gB(this),0)},
 grZ:function(a){if(J.de(this.gB(this),0))throw H.b(new P.lj("No elements"))
 return this.Zv(0,J.xH(this.gB(this),1))},
@@ -10814,7 +10817,7 @@
 if(typeof z!=="number")return H.s(z)
 y=0
 for(;y<z;++y){if(b.call$1(this.Zv(0,y))===!0)return!0
-if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,377],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,379],
 zV:[function(a,b){var z,y,x,w,v,u
 z=this.gB(this)
 if(b.length!==0){y=J.x(z)
@@ -10834,8 +10837,8 @@
 for(;v<z;++v){u=this.Zv(0,v)
 u=typeof u==="string"?u:H.d(u)
 w.vM=w.vM+u
-if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,332,333],
-ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,377],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,334,335],
+ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,379],
 ez:[function(a,b){return H.VM(new H.A8(this,b),[null,null])},"call$1","gIr",2,0,null,110],
 es:[function(a,b,c){var z,y,x
 z=this.gB(this)
@@ -10857,19 +10860,19 @@
 if(!(x<y))break
 y=this.Zv(0,x)
 if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 $isyN:true},
 nH:{
 "":"aL;l6,SH,AN",
 gMa:function(){var z,y
 z=J.q8(this.l6)
 y=this.AN
-if(y==null||J.xZ(y,z))return z
+if(y==null||J.z8(y,z))return z
 return y},
 gjX:function(){var z,y
 z=J.q8(this.l6)
 y=this.SH
-if(J.xZ(y,z))return z
+if(J.z8(y,z))return z
 return y},
 gB:function(a){var z,y,x
 z=J.q8(this.l6)
@@ -10902,8 +10905,7 @@
 return z}}},
 a7:{
 "":"a;l6,SW,G7,lo",
-gl:function(a){return this.lo},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.lo},
 G:[function(){var z,y,x,w
 z=this.l6
 y=J.U6(z)
@@ -10937,11 +10939,10 @@
 "":"Yl;lo,OI,T6",
 mb:function(a){return this.T6.call$1(a)},
 G:[function(){var z=this.OI
-if(z.G()){this.lo=this.mb(z.gl(z))
+if(z.G()){this.lo=this.mb(z.gl())
 return!0}this.lo=null
 return!1},"call$0","guK",0,0,null],
-gl:function(a){return this.lo},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.lo},
 $asYl:function(a,b){return[b]}},
 A8:{
 "":"aL;CR,T6",
@@ -10960,11 +10961,9 @@
 SO:{
 "":"Yl;OI,T6",
 mb:function(a){return this.T6.call$1(a)},
-G:[function(){for(var z=this.OI;z.G();)if(this.mb(z.gl(z))===!0)return!0
+G:[function(){for(var z=this.OI;z.G();)if(this.mb(z.gl())===!0)return!0
 return!1},"call$0","guK",0,0,null],
-gl:function(a){var z=this.OI
-return z.gl(z)},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)}},
+gl:function(){return this.OI.gl()}},
 kV:{
 "":"mW;l6,T6",
 gA:function(a){var z=new H.rR(J.GP(this.l6),this.T6,C.Gw,null)
@@ -10975,20 +10974,18 @@
 rR:{
 "":"a;OI,T6,TQ,lo",
 mb:function(a){return this.T6.call$1(a)},
-gl:function(a){return this.lo},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.lo},
 G:[function(){var z,y
 z=this.TQ
 if(z==null)return!1
 for(y=this.OI;!z.G();){this.lo=null
 if(y.G()){this.TQ=null
-z=J.GP(this.mb(y.gl(y)))
-this.TQ=z}else return!1}z=this.TQ
-this.lo=z.gl(z)
+z=J.GP(this.mb(y.gl()))
+this.TQ=z}else return!1}this.lo=this.TQ.gl()
 return!0},"call$0","guK",0,0,null]},
 H6:{
 "":"mW;l6,FT",
-eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gVQ",2,0,null,288],
+eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gVQ",2,0,null,292],
 gA:function(a){var z=this.l6
 z=new H.U1(z.gA(z),this.FT)
 z.$builtinTypeInfo=this.$builtinTypeInfo
@@ -11014,19 +11011,16 @@
 for(z=this.OI,y=0;y<this.FT;++y)z.G()
 this.FT=0
 return z.G()},"call$0","guK",0,0,null],
-gl:function(a){var z=this.OI
-return z.gl(z)},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)}},
+gl:function(){return this.OI.gl()}},
 SJ:{
 "":"a;",
 G:[function(){return!1},"call$0","guK",0,0,null],
-gl:function(a){return},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)}},
+gl:function(){return}},
 SU7:{
 "":"a;",
 sB:function(a,b){throw H.b(P.f("Cannot change the length of a fixed-length list"))},
 h:[function(a,b){throw H.b(P.f("Cannot add to a fixed-length list"))},"call$1","ght",2,0,null,23],
-Ay:[function(a,b){throw H.b(P.f("Cannot add to a fixed-length list"))},"call$1","gDY",2,0,null,109],
+FV:[function(a,b){throw H.b(P.f("Cannot add to a fixed-length list"))},"call$1","gDY",2,0,null,109],
 Rz:[function(a,b){throw H.b(P.f("Cannot remove from a fixed-length list"))},"call$1","gRI",2,0,null,124],
 V1:[function(a){throw H.b(P.f("Cannot clear a fixed-length list"))},"call$0","gyP",0,0,null]},
 JJ:{
@@ -11034,11 +11028,11 @@
 u:[function(a,b,c){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$2","gj3",4,0,null,47,23],
 sB:function(a,b){throw H.b(P.f("Cannot change the length of an unmodifiable list"))},
 h:[function(a,b){throw H.b(P.f("Cannot add to an unmodifiable list"))},"call$1","ght",2,0,null,23],
-Ay:[function(a,b){throw H.b(P.f("Cannot add to an unmodifiable list"))},"call$1","gDY",2,0,null,109],
+FV:[function(a,b){throw H.b(P.f("Cannot add to an unmodifiable list"))},"call$1","gDY",2,0,null,109],
 Rz:[function(a,b){throw H.b(P.f("Cannot remove from an unmodifiable list"))},"call$1","gRI",2,0,null,124],
 So:[function(a,b){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$1","gH7",0,2,null,77,128],
 V1:[function(a){throw H.b(P.f("Cannot clear an unmodifiable list"))},"call$0","gyP",0,0,null],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,334,115,116,109,117],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,336,115,116,109,117],
 $isList:true,
 $asWO:null,
 $isyN:true,
@@ -11068,17 +11062,17 @@
 bu:[function(a){return"Symbol(\""+H.d(this.fN)+"\")"},"call$0","gXo",0,0,null],
 $isGD:true,
 $iswv:true,
-static:{"":"zP",wX:[function(a){var z=J.U6(a)
+static:{"":"zP",le:[function(a){var z=J.U6(a)
 if(z.gl0(a)===!0)return a
 if(z.nC(a,"_"))throw H.b(new P.AT("\""+H.d(a)+"\" is a private identifier"))
 z=$.R0().Ej
 if(typeof a!=="string")H.vh(new P.AT(a))
 if(!z.test(a))throw H.b(new P.AT("\""+H.d(a)+"\" is not an identifier or an empty String"))
-return a},"call$1","uO",2,0,null,12]}}}],["dart._js_mirrors","dart:_js_mirrors",,H,{
+return a},"call$1","kh",2,0,null,12]}}}],["dart._js_mirrors","dart:_js_mirrors",,H,{
 "":"",
 YC:[function(a){if(a==null)return
 return new H.GD(a)},"call$1","Rc",2,0,null,12],
-X7:[function(a){return H.YC(H.d(a.fN)+"=")},"call$1","MR",2,0,null,129],
+X7:[function(a){return H.YC(H.d(a.fN)+"=")},"call$1","JP",2,0,null,129],
 vn:[function(a){var z=J.x(a)
 if(typeof a==="object"&&a!==null&&!!z.$isTp)return new H.Sz(a)
 else return new H.iu(a)},"call$1","Yf",2,0,130,131],
@@ -11092,8 +11086,8 @@
 if(y!=null)return y
 z=J.U6(b)
 x=z.u8(b,"<")
-if(x!==-1){w=H.jO(z.JT(b,0,x)).gJi()
-y=new H.bl(w,z.JT(b,x+1,J.xH(z.gB(b),1)),null,null,null,null,null,null,null,null,null,null,null,null,null,w.gIf())
+if(x!==-1){w=H.jO(z.Nj(b,0,x)).gJi()
+y=new H.bl(w,z.Nj(b,x+1,J.xH(z.gB(b),1)),null,null,null,null,null,null,null,null,null,null,null,null,null,w.gIf())
 $.tY[b]=y
 return y}v=H.pL(b)
 if(v==null){u=init.functionAliases[b]
@@ -11117,7 +11111,7 @@
 if(n==null||n.length===0)y=o
 else{for(z=n.length,m="dynamic",l=1;l<z;++l)m+=",dynamic"
 y=new H.bl(o,m,null,null,null,null,null,null,null,null,null,null,null,null,null,o.If)}}$.tY[b]=y
-return y},"call$2","lg",4,0,null,129,132],
+return y},"call$2","ER",4,0,null,129,132],
 Vv:[function(a){var z,y,x
 z=P.L5(null,null,null,null,null)
 for(y=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);y.G();){x=y.lo
@@ -11128,11 +11122,11 @@
 if(x.gxV())z.u(0,x.gIf(),x)}return z},"call$1","Pj",2,0,null,133],
 vE:[function(a,b){var z,y,x,w,v,u
 z=P.L5(null,null,null,null,null)
-z.Ay(0,b)
+z.FV(0,b)
 for(y=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);y.G();){x=y.lo
 if(x.ghB()){w=x.gIf().fN
 v=J.U6(w)
-v=z.t(0,H.YC(v.JT(w,0,J.xH(v.gB(w),1))))
+v=z.t(0,H.YC(v.Nj(w,0,J.xH(v.gB(w),1))))
 u=J.x(v)
 if(typeof v==="object"&&v!==null&&!!u.$isRY)continue}if(x.gxV())continue
 z.to(x.gIf(),new H.YX(x))}return z},"call$2","un",4,0,null,133,134],
@@ -11143,7 +11137,7 @@
 x.G()
 w=x.lo
 for(;x.G();)w=new H.BI(w,x.lo,null,null,H.YC(b))
-return w},"call$2","V8",4,0,null,135,132],
+return w},"call$2","R9",4,0,null,135,132],
 w2:[function(a,b){var z,y,x
 z=J.U6(a)
 y=0
@@ -11162,7 +11156,7 @@
 if(x==null)w=H.Ko(b,null)
 else if(x.gHA())if(typeof b==="number"){v=init.metadata[b]
 u=x.gNy()
-return J.UQ(u,H.w2(u,J.DA(v)))}else w=H.Ko(b,null)
+return J.UQ(u,H.w2(u,J.O6(v)))}else w=H.Ko(b,null)
 else{z=new H.rh(z)
 if(typeof b==="number"){t=z.call$1(b)
 x=J.x(t)
@@ -11179,7 +11173,7 @@
 return H.VM(new H.A8(y,new H.ye()),[null,null]).br(0)}x=Function.prototype.toString.call(a)
 w=C.xB.cn(x,new H.VR(H.v4("\"[0-9,]*\";?[ \n\r]*}",!1,!0,!1),null,null))
 if(w===-1)return C.xD;++w
-return H.VM(new H.A8(H.VM(new H.A8(C.xB.JT(x,w,C.xB.XU(x,"\"",w)).split(","),P.ya()),[null,null]),new H.O1()),[null,null]).br(0)},"call$1","C7",2,0,null,140],
+return H.VM(new H.A8(H.VM(new H.A8(C.xB.Nj(x,w,C.xB.XU(x,"\"",w)).split(","),P.ya()),[null,null]),new H.O1()),[null,null]).br(0)},"call$1","C7",2,0,null,140],
 jw:[function(a,b,c,d){var z,y,x,w,v,u,t,s,r
 z=J.U6(b)
 if(typeof b==="object"&&b!==null&&(b.constructor===Array||!!z.$isList)){y=H.Mk(z.t(b,0),",")
@@ -11208,7 +11202,7 @@
 z=this.L5
 if(z!=null)return z
 y=P.L5(null,null,null,null,null)
-for(z=$.vK(),z=z.gUQ(z),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)for(x=J.GP(z.lo);x.G();){w=x.gl(x)
+for(z=$.vK(),z=z.gUQ(z),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)for(x=J.GP(z.lo);x.G();){w=x.gl()
 y.u(0,w.gFP(),w)}z=H.VM(new H.Oh(y),[P.iD,P.D4])
 this.L5=z
 return z},
@@ -11228,7 +11222,7 @@
 n=v.t(w,6)
 m=v.t(w,7)
 l=p==null?C.xD:p()
-J.bi(z.to(u,new H.nI()),new H.Uz(s,r,q,l,o,n,m,null,null,null,null,null,null,null,null,null,null,H.YC(u)))}return z},"call$0","Qw",0,0,null]}},
+J.bi(z.to(u,new H.nI()),new H.Uz(s,r,q,l,o,n,m,null,null,null,null,null,null,null,null,null,null,H.YC(u)))}return z},"call$0","jc",0,0,null]}},
 nI:{
 "":"Tp:108;",
 call$0:[function(){return H.VM([],[P.D4])},"call$0",null,0,0,null,"call"],
@@ -11241,17 +11235,17 @@
 Lj:{
 "":"TY;MA",
 gOO:function(){return"Isolate"},
-gcZ:function(){var z=$.At().gvU().nb
+gcZ:function(){var z=$.Cm().gvU().nb
 return z.gUQ(z).XG(0,new H.mb())},
 $isej:true},
 mb:{
-"":"Tp:379;",
-call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,378,"call"],
+"":"Tp:381;",
+call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,380,"call"],
 $isEH:true},
 mZ:{
 "":"TY;If<",
 gvd:function(){return H.fb(this.gXP(),this.gIf())},
-gkw:function(){return J.co(this.gIf().fN,"_")},
+gq4:function(){return J.co(this.gIf().fN,"_")},
 bu:[function(a){return this.gOO()+" on '"+H.d(this.gIf().fN)+"'"},"call$0","gXo",0,0,null],
 jd:[function(a,b){throw H.b(H.Ef("Should not call _invoke"))},"call$2","gqi",4,0,null,43,44],
 $isNL:true,
@@ -11284,7 +11278,7 @@
 $isNL:true,
 $isej:true},
 Uz:{
-"":"NZ;FP<,aP,wP,le,LB,GD<,ae<,SD,zE,P8,mX,T1,fX,M2,uA,Db,Ok,If",
+"":"NZ;FP<,aP,wP,le,LB,GD<,ae<,SD,zE,P8,mX,T1,fX,M2,uA,Db,xO,If",
 gOO:function(){return"LibraryMirror"},
 gvd:function(){return this.If},
 gEO:function(){return this.gm8()},
@@ -11292,7 +11286,7 @@
 z=this.P8
 if(z!=null)return z
 y=P.L5(null,null,null,null,null)
-for(z=J.GP(this.aP);z.G();){x=H.jO(z.gl(z))
+for(z=J.GP(this.aP);z.G();){x=H.jO(z.gl())
 w=J.x(x)
 if(typeof x==="object"&&x!==null&&!!w.$isMs){x=x.gJi()
 if(!!x.$isWf){y.u(0,x.If,x)
@@ -11375,7 +11369,7 @@
 if(z!=null)return z
 z=this.gqh()
 y=P.L5(null,null,null,null,null)
-y.Ay(0,z)
+y.FV(0,z)
 z=new H.IB(y)
 this.gQn().nb.aN(0,z)
 this.gAR().nb.aN(0,z)
@@ -11392,10 +11386,10 @@
 z=H.VM(new H.Oh(y),[P.wv,P.NL])
 this.Db=z
 return z},
-gc9:function(){var z=this.Ok
+gc9:function(){var z=this.xO
 if(z!=null)return z
 z=H.VM(new P.Yp(J.C0(this.le,H.Yf())),[P.vr])
-this.Ok=z
+this.xO=z
 return z},
 gXP:function(){return},
 t:[function(a,b){return H.vh(P.SY(null))},"call$1","gIA",2,0,null,12],
@@ -11406,11 +11400,11 @@
 "":"mZ+M2;",
 $isej:true},
 IB:{
-"":"Tp:380;a",
+"":"Tp:382;a",
 call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true},
 oP:{
-"":"Tp:380;a",
+"":"Tp:382;a",
 call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true},
 YX:{
@@ -11465,11 +11459,11 @@
 w=t.ZU(y)
 x[c]=w}else t=null
 if(w.gpf())return H.vn(w.Bj(y,t==null?new H.LI(a,$.I6().t(0,c),b,d,[],null):t))
-else return H.vn(w.Bj(y,d))},"call$4","gqi",8,0,null,12,11,381,82],
+else return H.vn(w.Bj(y,d))},"call$4","gqi",8,0,null,12,11,383,82],
 PU:[function(a,b){var z=H.d(a.gfN(a))+"="
 this.tu(H.YC(z),2,z,[b])
 return H.vn(b)},"call$2","gtd",4,0,null,65,165],
-rN:[function(a){return this.tu(a,1,J.GL(a),[])},"call$1","gJC",2,0,null,65],
+rN:[function(a){return this.tu(a,1,J.GL(a),[])},"call$1","gPo",2,0,null,65],
 n:[function(a,b){var z,y
 if(b==null)return!1
 z=J.x(b)
@@ -11485,7 +11479,7 @@
 $isvr:true,
 $isej:true},
 mg:{
-"":"Tp:382;a",
+"":"Tp:384;a",
 call$2:[function(a,b){var z,y
 z=a.gfN(a)
 y=this.a
@@ -11539,8 +11533,8 @@
 z=this.Db
 if(z!=null)return z
 y=P.L5(null,null,null,P.wv,P.NL)
-y.Ay(0,this.gQH())
-y.Ay(0,this.gEz())
+y.FV(0,this.gQH())
+y.FV(0,this.gEz())
 J.kH(this.NK.gNy(),new H.Ax(y))
 z=H.VM(new H.Oh(y),[P.wv,P.NL])
 this.Db=z
@@ -11561,7 +11555,7 @@
 z=this.NK.MR(this)
 this.qm=z
 return z},
-gkw:function(){return J.co(this.NK.gIf().fN,"_")},
+gq4:function(){return J.co(this.NK.gIf().fN,"_")},
 gvd:function(){return this.NK.gvd()},
 gYj:function(){return new H.cu(this.gCr(),null)},
 gIf:function(){return this.NK.gIf()},
@@ -11577,11 +11571,11 @@
 y=this.a
 if(J.de(z,-1))y.push(H.jO(J.rr(a)))
 else{x=init.metadata[z]
-y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.DA(x))))}},"call$1",null,2,0,null,383,"call"],
+y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.O6(x))))}},"call$1",null,2,0,null,385,"call"],
 $isEH:true},
 Oo:{
 "":"Tp:229;",
-call$1:[function(a){return-1},"call$1",null,2,0,null,384,"call"],
+call$1:[function(a){return-1},"call$1",null,2,0,null,240,"call"],
 $isEH:true},
 Tc:{
 "":"Tp:229;b",
@@ -11590,10 +11584,10 @@
 Ax:{
 "":"Tp:229;a",
 call$1:[function(a){this.a.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,385,"call"],
+return a},"call$1",null,2,0,null,386,"call"],
 $isEH:true},
 Wf:{
-"":"HZT;Cr<,Tx<,H8,Ht,pz,le,qN,qu,zE,b0,FU,T1,fX,M2,uA,Db,Ok,qm,UF,eL,QY,nz,If",
+"":"HZT;Cr<,Tx<,H8,Ht,pz,le,qN,qu,zE,b0,FU,T1,fX,M2,uA,Db,xO,qm,UF,eL,QY,nz,If",
 gOO:function(){return"ClassMirror"},
 gaB:function(){var z,y
 z=this.Tx
@@ -11611,7 +11605,7 @@
 x=H.VM([],[H.Zk])
 for(w=H.VM(new H.a7(y,y.length,0,null),[H.Kp(y,0)]);w.G();){v=w.lo
 if(H.Y6(v))continue
-u=$.rS().t(0,v)
+u=$.bx().t(0,v)
 if(u==null)continue
 t=H.Sd(u,z[v],!1,!1)
 x.push(t)
@@ -11626,7 +11620,7 @@
 q=H.ys(o,"$",".")}}else continue
 t=H.Sd(q,r,!p,p)
 x.push(t)
-t.nz=a}return x},"call$1","gN4",2,0,null,386],
+t.nz=a}return x},"call$1","gN4",2,0,null,387],
 gEO:function(){var z=this.qu
 if(z!=null)return z
 z=this.ly(this)
@@ -11639,10 +11633,10 @@
 x=y[1]
 y=this.Ht
 if(y!=null){x=[x]
-C.Nm.Ay(x,y)}H.jw(a,x,!1,z)
+C.Nm.FV(x,y)}H.jw(a,x,!1,z)
 w=init.statics[this.Cr]
 if(w!=null)H.jw(a,w[""],!0,z)
-return z},"call$1","gMp",2,0,null,387],
+return z},"call$1","gMp",2,0,null,388],
 gTH:function(){var z=this.zE
 if(z!=null)return z
 z=this.ws(this)
@@ -11692,14 +11686,14 @@
 z=z.gUQ(z)
 y=new H.MH(null,J.GP(z.l6),z.T6)
 y.$builtinTypeInfo=[H.Kp(z,0),H.Kp(z,1)]
-for(;y.G();)for(z=J.GP(y.lo);z.G();)z.gl(z).gqh()}z=this.nz
+for(;y.G();)for(z=J.GP(y.lo);z.G();)z.gl().gqh()}z=this.nz
 if(z==null)throw H.b(new P.lj("Class \""+H.d(this.If.fN)+"\" has no owner"))}return z},
-gc9:function(){var z=this.Ok
+gc9:function(){var z=this.xO
 if(z!=null)return z
 z=this.le
 if(z==null){z=H.pj(this.gaB().prototype)
 this.le=z}z=H.VM(new P.Yp(J.C0(z,H.Yf())),[P.vr])
-this.Ok=z
+this.xO=z
 return z},
 gAY:function(){var z,y,x,w,v,u
 z=this.qN
@@ -11739,7 +11733,7 @@
 if(x==null)return y
 for(w=0;w<x.length;++w){z=x[w]
 v=init.metadata[z]
-y.push(new H.cw(this,v,z,null,H.YC(J.DA(v))))}z=H.VM(new P.Yp(y),[null])
+y.push(new H.cw(this,v,z,null,H.YC(J.O6(v))))}z=H.VM(new P.Yp(y),[null])
 this.UF=z
 return z},
 gw8:function(){return C.hU},
@@ -11755,22 +11749,22 @@
 "":"EE+M2;",
 $isej:true},
 Ei:{
-"":"Tp:380;a",
+"":"Tp:382;a",
 call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true},
 U7:{
 "":"Tp:229;b",
 call$1:[function(a){this.b.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,385,"call"],
+return a},"call$1",null,2,0,null,386,"call"],
 $isEH:true},
 t0:{
-"":"Tp:388;a",
-call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,339,"call"],
+"":"Tp:389;a",
+call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,341,"call"],
 $isEH:true},
 Ld:{
-"":"mZ;ao<,V5<,Fo<,n6,nz,Ad>,le,If",
+"":"mZ;ao<,V5<,Fo<,n6,nz,Ay>,le,If",
 gOO:function(){return"VariableMirror"},
-gt5:function(a){return H.Jf(this.nz,init.metadata[this.Ad])},
+gt5:function(a){return H.Jf(this.nz,init.metadata[this.Ay])},
 gXP:function(){return this.nz},
 gc9:function(){var z=this.le
 if(z==null){z=this.n6
@@ -11793,11 +11787,11 @@
 u=H.GQ(y.j(x,v.W(w,1)))
 if(u===0)return
 t=C.jn.GG(u,2)===0
-s=y.JT(x,0,v.W(w,1))
+s=y.Nj(x,0,v.W(w,1))
 r=y.u8(x,":")
-if(r>0){q=C.xB.JT(s,0,r)
+if(r>0){q=C.xB.Nj(s,0,r)
 s=y.yn(x,r+1)}else q=s
-p=d?$.Sl().t(0,q):$.rS().t(0,"g"+q)
+p=d?$.Sl().t(0,q):$.bx().t(0,"g"+q)
 if(p==null)p=q
 if(t){o=H.YC(H.d(p)+"=")
 y=c.gEO()
@@ -11828,7 +11822,7 @@
 w=J.RE(y)
 if(typeof y==="object"&&y!==null&&!!w.$isv){u=y.gjm()
 y.gnw()
-t=$.rS().t(0,w.gRA(y))
+t=$.bx().t(0,w.gRA(y))
 if(t==null)H.Hz(t)
 s=H.Sd(t,u,!1,!1)}else s=new H.Zk(y[x],v,!1,!1,!0,!1,!1,null,null,null,null,H.YC(x))
 y.constructor[z]=s
@@ -11865,12 +11859,12 @@
 t=z?new H.Ar(v.hl(null),null,null,null,this.nz):new H.Ar(v.hl(this.nz.gJi().gTx()),null,null,null,this.nz)}if(this.xV)this.G6=this.nz
 else this.G6=t.gdw()
 s=v.Mo
-for(z=t.gMP(),z=z.gA(z),x=w.length,r=v.Ee,q=0;z.G();q=k){p=z.lo
+for(z=t.gMP(),z=z.gA(z),x=w.length,r=v.hG,q=0;z.G();q=k){p=z.lo
 o=init.metadata[v.Rn[q+r+3]]
 n=J.RE(p)
-if(q<v.Rv)m=new H.fu(this,n.gAd(p),!1,!1,null,H.YC(o))
+if(q<v.Rv)m=new H.fu(this,n.gAy(p),!1,!1,null,H.YC(o))
 else{l=v.BX(0,q)
-m=new H.fu(this,n.gAd(p),!0,s,l,H.YC(o))}k=q+1
+m=new H.fu(this,n.gAy(p),!0,s,l,H.YC(o))}k=q+1
 if(q>=x)return H.e(w,q)
 w[q]=m}}this.H3=H.VM(new P.Yp(w),[P.Ys])
 z=H.VM(new P.Yp(J.C0(y,H.Yf())),[null])
@@ -11901,9 +11895,9 @@
 u=!1}w=H.YC(a)
 return new H.Zk(b,J.WB(v,t),u,x,c,d,y,null,null,null,null,w)}}},
 fu:{
-"":"mZ;XP<,Ad>,Q2<,Sh,BE,If",
+"":"mZ;XP<,Ay>,Q2<,Sh,BE,If",
 gOO:function(){return"ParameterMirror"},
-gt5:function(a){return H.Jf(this.XP,this.Ad)},
+gt5:function(a){return H.Jf(this.XP,this.Ay)},
 gFo:function(){return!1},
 gV5:function(){return!1},
 gc9:function(){return H.vh(P.SY(null))},
@@ -11937,7 +11931,7 @@
 gJi:function(){return H.vh(P.SY(null))},
 gIf:function(){return H.vh(P.SY(null))},
 gvd:function(){return H.vh(P.SY(null))},
-gkw:function(){return H.vh(P.SY(null))},
+gq4:function(){return H.vh(P.SY(null))},
 gc9:function(){return H.vh(P.SY(null))}},
 Ar:{
 "":"TN;d9,o3,yA,zM,XP<",
@@ -11981,21 +11975,22 @@
 this.o3=z
 return z},"call$0","gXo",0,0,null],
 gah:function(){return H.vh(P.SY(null))},
-K9:function(a,b){return this.gah().call$2(a,b)},
+V7:function(a,b){return this.gah().call$2(a,b)},
+nQ:function(a){return this.gah().call$1(a)},
 $isMs:true,
 $isej:true,
 $isX9:true,
 $isNL:true},
 rh:{
-"":"Tp:389;a",
+"":"Tp:390;a",
 call$1:[function(a){var z,y,x
 z=init.metadata[a]
 y=this.a
-x=H.w2(y.a.gNy(),J.DA(z))
+x=H.w2(y.a.gNy(),J.O6(z))
 return J.UQ(y.a.gw8(),x)},"call$1",null,2,0,null,47,"call"],
 $isEH:true},
 jB:{
-"":"Tp:390;b",
+"":"Tp:391;b",
 call$1:[function(a){var z,y
 z=this.b.call$1(a)
 y=J.x(z)
@@ -12003,12 +11998,12 @@
 return z.gCr()},"call$1",null,2,0,null,47,"call"],
 $isEH:true},
 ye:{
-"":"Tp:389;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,339,"call"],
+"":"Tp:390;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,341,"call"],
 $isEH:true},
 O1:{
-"":"Tp:389;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,339,"call"],
+"":"Tp:390;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,341,"call"],
 $isEH:true},
 Oh:{
 "":"a;nb",
@@ -12017,17 +12012,17 @@
 gor:function(a){return this.nb.X5!==0},
 t:[function(a,b){return this.nb.t(0,b)},"call$1","gIA",2,0,null,42],
 x4:[function(a){return this.nb.x4(a)},"call$1","gV9",2,0,null,42],
-PF:[function(a){return this.nb.PF(a)},"call$1","gmc",2,0,null,23],
+di:[function(a){return this.nb.di(a)},"call$1","gmc",2,0,null,23],
 aN:[function(a,b){return this.nb.aN(0,b)},"call$1","gjw",2,0,null,110],
 gvc:function(a){var z=this.nb
-return H.VM(new P.Cm(z),[H.Kp(z,0)])},
+return H.VM(new P.i5(z),[H.Kp(z,0)])},
 gUQ:function(a){var z=this.nb
 return z.gUQ(z)},
 u:[function(a,b,c){return H.kT()},"call$2","gj3",4,0,null,42,23],
-Ay:[function(a,b){return H.kT()},"call$1","gDY",2,0,null,104],
+FV:[function(a,b){return H.kT()},"call$1","gDY",2,0,null,104],
 Rz:[function(a,b){H.kT()},"call$1","gRI",2,0,null,42],
 V1:[function(a){return H.kT()},"call$0","gyP",0,0,null],
-$isL8:true,
+$isZ0:true,
 static:{kT:[function(){throw H.b(P.f("Cannot modify an unmodifiable Map"))},"call$0","lY",0,0,null]}},
 "":"Sk<"}],["dart._js_names","dart:_js_names",,H,{
 "":"",
@@ -12052,8 +12047,8 @@
 z.fixed$length=init
 return z},"call$1","wp",2,0,null,140],
 Xh:{
-"":"Tp:391;a",
-call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,381,"call"],
+"":"Tp:392;a",
+call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,383,"call"],
 $isEH:true}}],["dart.async","dart:async",,P,{
 "":"",
 K2:[function(a,b,c){var z=H.N7()
@@ -12095,8 +12090,8 @@
 x=new H.XO(u,null)
 $.X3.hk(y,x)}},"call$1","DC",2,0,null,151],
 YE:[function(a){},"call$1","bZ",2,0,152,23],
-Z0:[function(a,b){$.X3.hk(a,b)},function(a){return P.Z0(a,null)},null,"call$2","call$1","bx",2,2,153,77,146,147],
-av:[function(){return},"call$0","Vj",0,0,107],
+SZ:[function(a,b){$.X3.hk(a,b)},function(a){return P.SZ(a,null)},null,"call$2","call$1","AY",2,2,153,77,146,147],
+dL:[function(){return},"call$0","v3",0,0,107],
 FE:[function(a,b,c){var z,y,x,w
 try{b.call$1(a.call$0())}catch(x){w=H.Ru(x)
 z=w
@@ -12137,18 +12132,18 @@
 z=$.X3
 try{$.X3=c
 y=d.call$2(e,f)
-return y}finally{$.X3=z}},"call$6","C9",12,0,166,161,162,148,110,54,55],
-Ee:[function(a,b,c,d){return d},"call$4","Qk",8,0,167,161,162,148,110],
+return y}finally{$.X3=z}},"call$6","l4",12,0,166,161,162,148,110,54,55],
+Ee:[function(a,b,c,d){return d},"call$4","EU",8,0,167,161,162,148,110],
 cQ:[function(a,b,c,d){return d},"call$4","zi",8,0,168,161,162,148,110],
-dL:[function(a,b,c,d){return d},"call$4","v3",8,0,169,161,162,148,110],
+VI:[function(a,b,c,d){return d},"call$4","uu",8,0,169,161,162,148,110],
 Tk:[function(a,b,c,d){P.IA(C.NU!==c?c.ce(d):d)},"call$4","G2",8,0,170,161,162,148,110],
 h8:[function(a,b,c,d,e){return P.jL(d,C.NU!==c?c.ce(e):e)},"call$5","KF",10,0,171,161,162,148,159,150],
-Jj:[function(a,b,c,d){H.qw(d)},"call$4","ZB",8,0,172,161,162,148,173],
-CI:[function(a){J.wl($.X3,a)},"call$1","jt",2,0,174,173],
-qc:[function(a,b,c,d,e){var z
+XB:[function(a,b,c,d){H.qw(d)},"call$4","YM",8,0,172,161,162,148,173],
+CI:[function(a){J.O2($.X3,a)},"call$1","jt",2,0,174,173],
+UA:[function(a,b,c,d,e){var z
 $.oK=P.jt()
 z=P.Py(null,null,null,null,null)
-return new P.uo(c,d,z)},"call$5","LS",10,0,175,161,162,148,176,177],
+return new P.cc(c,d,z)},"call$5","hn",10,0,175,161,162,148,176,177],
 Ca:{
 "":"a;kc>,I4<",
 $isGe:true},
@@ -12159,7 +12154,7 @@
 gY8:function(){return this.Y8},
 uR:[function(a){var z=this.Ae
 if(typeof z!=="number")return z.i()
-return(z&1)===a},"call$1","gLM",2,0,null,392],
+return(z&1)===a},"call$1","gLM",2,0,null,393],
 Ac:[function(){var z=this.Ae
 if(typeof z!=="number")return z.w()
 this.Ae=z^1},"call$0","gUe",0,0,null],
@@ -12205,7 +12200,7 @@
 this.SJ=x
 x.Ae=this.Gv&1
 if(this.iE===x)P.ot(this.nL)
-return x},"call$1","gwk",2,0,null,344],
+return x},"call$1","gwk",2,0,null,346],
 j0:[function(a){if(a.giE()===a)return
 if(a.gP4())a.dK()
 else{this.p1(a)
@@ -12215,9 +12210,9 @@
 q7:[function(){if((this.Gv&4)!==0)return new P.lj("Cannot add new events after calling close")
 return new P.lj("Cannot add new events while doing an addStream")},"call$0","gVo",0,0,null],
 h:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},300],
-M3:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.pb(a,b)},function(a){return this.M3(a,null)},"fH","call$2","call$1","gGj",2,2,393,77,146,147],
+this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},237],
+zw:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
+this.pb(a,b)},function(a){return this.zw(a,null)},"JT","call$2","call$1","gXB",2,2,394,77,146,147],
 cO:[function(a){var z,y
 z=this.Gv
 if((z&4)!==0)return this.Ip
@@ -12226,7 +12221,7 @@
 y=this.SL()
 this.SY()
 return y},"call$0","gJK",0,0,null],
-Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,300],
+Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,237],
 V8:[function(a,b){this.pb(a,b)},"call$2","grd",4,0,null,146,147],
 Qj:[function(){var z=this.WX
 this.WX=null
@@ -12251,7 +12246,7 @@
 y.sAe(z&4294967293)
 y=w}else y=y.giE()
 this.Gv=this.Gv&4294967293
-if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,376],
+if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,378],
 Of:[function(){if((this.Gv&4)!==0&&this.Ip.Gv===0)this.Ip.OH(null)
 P.ot(this.QC)},"call$0","gVg",0,0,null]},
 dz:{
@@ -12262,7 +12257,7 @@
 this.iE.Rg(0,a)
 this.Gv=this.Gv&4294967293
 if(this.iE===this)this.Of()
-return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,300],
+return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,237],
 pb:[function(a,b){if(this.iE===this)return
 this.nE(new P.OR(this,a,b))},"call$2","gTb",4,0,null,146,147],
 SY:[function(){if(this.iE!==this)this.nE(new P.Bg(this))
@@ -12287,7 +12282,7 @@
 Iv:[function(a){var z,y
 for(z=this.iE;z!==this;z=z.giE()){y=new P.LV(a,null)
 y.$builtinTypeInfo=[null]
-z.w6(y)}},"call$1","gm9",2,0,null,300],
+z.w6(y)}},"call$1","gm9",2,0,null,237],
 pb:[function(a,b){var z
 for(z=this.iE;z!==this;z=z.giE())z.w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,146,147],
 SY:[function(){var z=this.iE
@@ -12296,18 +12291,18 @@
 b8:{
 "":"a;",
 $isb8:true},
-Pf0:{
+Ia:{
 "":"a;"},
 Zf:{
-"":"Pf0;MM",
+"":"Ia;MM",
 oo:[function(a,b){var z=this.MM
-if(z.Gv!==0)throw H.b(new P.lj("Future already completed"))
-z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1",null,"gv6",0,2,null,77,23],
+if(z.Gv!==0)throw H.b(P.w("Future already completed"))
+z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1","call$0","gv6",0,2,395,77,23],
 w0:[function(a,b){var z
 if(a==null)throw H.b(new P.AT("Error must not be null"))
 z=this.MM
 if(z.Gv!==0)throw H.b(new P.lj("Future already completed"))
-z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,393,77,146,147]},
+z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,394,77,146,147]},
 vs:{
 "":"a;Gv,Lj<,jk,BQ@,OY,As,qV,o4",
 gcg:function(){return this.Gv>=4},
@@ -12330,13 +12325,13 @@
 y=P.VH(a,z)
 x=H.VM(new P.vs(0,z,null,null,null,$.X3.cR(b),y,null),[null])
 this.au(x)
-return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,156,377],
+return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,156,379],
 wM:[function(a){var z,y
 z=$.X3
 y=new P.vs(0,z,null,null,null,null,null,z.Al(a))
 y.$builtinTypeInfo=this.$builtinTypeInfo
 this.au(y)
-return y},"call$1","gE1",2,0,null,376],
+return y},"call$1","gE1",2,0,null,378],
 gDL:function(){return this.jk},
 gcG:function(){return this.jk},
 Am:[function(a){this.Gv=4
@@ -12345,7 +12340,7 @@
 this.jk=new P.Ca(a,b)},"call$2","gM6",4,0,null,146,147],
 au:[function(a){if(this.Gv>=4)this.Lj.wr(new P.da(this,a))
 else{a.sBQ(this.jk)
-this.jk=a}},"call$1","gXA",2,0,null,295],
+this.jk=a}},"call$1","gXA",2,0,null,298],
 L3:[function(){var z,y,x
 z=this.jk
 this.jk=null
@@ -12366,7 +12361,7 @@
 if(y);if(y)z=typeof a!=="object"||a===null||!z.$isvs||a.Gv<4
 else z=!1
 if(z){this.rX(a)
-return}if(this.Gv!==0)H.vh(new P.lj("Future already completed"))
+return}if(this.Gv!==0)H.vh(P.w("Future already completed"))
 this.Gv=1
 this.Lj.wr(new P.rH(this,a))},"call$1","gZV",2,0,null,23],
 CG:[function(a,b){if(this.Gv!==0)H.vh(new P.lj("Future already completed"))
@@ -12431,7 +12426,7 @@
 call$1:[function(a){this.a.rX(a)},"call$1",null,2,0,null,23,"call"],
 $isEH:true},
 dm:{
-"":"Tp:394;b",
+"":"Tp:396;b",
 call$2:[function(a,b){this.b.K5(a,b)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,146,147,"call"],
 $isEH:true},
 rH:{
@@ -12485,10 +12480,10 @@
 $isEH:true},
 wB:{
 "":"Tp:229;c,UI",
-call$1:[function(a){P.HZ(this.c.e,this.UI)},"call$1",null,2,0,null,395,"call"],
+call$1:[function(a){P.HZ(this.c.e,this.UI)},"call$1",null,2,0,null,397,"call"],
 $isEH:true},
 Pu:{
-"":"Tp:394;a,bK",
+"":"Tp:396;a,bK",
 call$2:[function(a,b){var z,y,x,w
 z=this.a
 y=z.a
@@ -12499,7 +12494,7 @@
 $isEH:true},
 qh:{
 "":"a;",
-ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,396],
+ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,398],
 tg:[function(a,b){var z,y
 z={}
 y=P.Dt(J.kn)
@@ -12511,19 +12506,19 @@
 y=P.Dt(null)
 z.a=null
 z.a=this.KR(new P.lz(z,this,b,y),!0,new P.M4(y),y.gbY())
-return y},"call$1","gjw",2,0,null,376],
+return y},"call$1","gjw",2,0,null,378],
 Vr:[function(a,b){var z,y
 z={}
 y=P.Dt(J.kn)
 z.a=null
 z.a=this.KR(new P.Jp(z,this,b,y),!0,new P.eN(y),y.gbY())
-return y},"call$1","gG2",2,0,null,377],
+return y},"call$1","gG2",2,0,null,379],
 gB:function(a){var z,y
 z={}
 y=new P.vs(0,$.X3,null,null,null,null,null,null)
 y.$builtinTypeInfo=[J.im]
 z.a=0
-this.KR(new P.B5(z),!0,new P.PI(z,y),y.gbY())
+this.KR(new P.PI(z),!0,new P.uO(z,y),y.gbY())
 return y},
 gl0:function(a){var z,y
 z={}
@@ -12539,11 +12534,11 @@
 eR:[function(a,b){var z=H.VM(new P.dq(b,this),[null])
 z.U6(this,b,null)
 return z},"call$1","gVQ",2,0,null,122],
-gFV:function(a){var z,y
+gtH:function(a){var z,y
 z={}
 y=P.Dt(H.ip(this,"qh",0))
 z.a=null
-z.a=this.KR(new P.lU(z,this,y),!0,new P.xp(y),y.gbY())
+z.a=this.KR(new P.lU(z,this,y),!0,new P.OC(y),y.gbY())
 return y},
 grZ:function(a){var z,y
 z={}
@@ -12574,8 +12569,8 @@
 call$0:[function(){return J.de(this.f,this.e)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 LB:{
-"":"Tp:372;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,397,"call"],
+"":"Tp:374;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,399,"call"],
 $isEH:true},
 DO:{
 "":"Tp:108;bK",
@@ -12592,7 +12587,7 @@
 $isEH:true},
 Jb:{
 "":"Tp:229;",
-call$1:[function(a){},"call$1",null,2,0,null,384,"call"],
+call$1:[function(a){},"call$1",null,2,0,null,240,"call"],
 $isEH:true},
 M4:{
 "":"Tp:108;UI",
@@ -12611,25 +12606,25 @@
 call$0:[function(){return this.e.call$1(this.f)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 pr:{
-"":"Tp:372;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,397,"call"],
+"":"Tp:374;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,399,"call"],
 $isEH:true},
 eN:{
 "":"Tp:108;bK",
 call$0:[function(){this.bK.rX(!1)},"call$0",null,0,0,null,"call"],
 $isEH:true},
-B5:{
+PI:{
 "":"Tp:229;a",
 call$1:[function(a){var z=this.a
-z.a=z.a+1},"call$1",null,2,0,null,384,"call"],
+z.a=z.a+1},"call$1",null,2,0,null,240,"call"],
 $isEH:true},
-PI:{
+uO:{
 "":"Tp:108;a,b",
 call$0:[function(){this.b.rX(this.a.a)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 j4:{
 "":"Tp:229;a,b",
-call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,384,"call"],
+call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,240,"call"],
 $isEH:true},
 i9:{
 "":"Tp:108;c",
@@ -12637,7 +12632,7 @@
 $isEH:true},
 VV:{
 "":"Tp;a,b",
-call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,300,"call"],
+call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,237,"call"],
 $isEH:true,
 $signature:function(){return H.IG(function(a){return{func:"Lf",args:[a]}},this.a,"qh")}},
 Dy:{
@@ -12649,7 +12644,7 @@
 call$1:[function(a){P.Bb(this.a.a,this.c,a)},"call$1",null,2,0,null,23,"call"],
 $isEH:true,
 $signature:function(){return H.IG(function(a){return{func:"Lf",args:[a]}},this.b,"qh")}},
-xp:{
+OC:{
 "":"Tp:108;d",
 call$0:[function(){this.d.Lp(new P.lj("No elements"))},"call$0",null,0,0,null,"call"],
 $isEH:true},
@@ -12686,14 +12681,14 @@
 return this.iP.gmT()},
 kW:[function(){var z,y
 if((this.Gv&8)===0){z=this.iP
-if(z==null){z=new P.ny(null,null,0)
+if(z==null){z=new P.Qk(null,null,0)
 this.iP=z}return z}y=this.iP
 y.gmT()
 return y.gmT()},"call$0","gUo",0,0,null],
-ghG:function(){if((this.Gv&8)!==0)return this.iP.gmT()
+gEe:function(){if((this.Gv&8)!==0)return this.iP.gmT()
 return this.iP},
 BW:[function(){if((this.Gv&4)!==0)return new P.lj("Cannot add event after closing")
-return new P.lj("Cannot add event while adding a stream")},"call$0","gQ7",0,0,null],
+return new P.lj("Cannot add event while adding a stream")},"call$0","gCi",0,0,null],
 h:[function(a,b){if(this.Gv>=4)throw H.b(this.BW())
 this.Rg(0,b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU6",void:true,args:[a]}},this.$receiver,"ms")},23],
 cO:[function(a){var z,y
@@ -12731,7 +12726,7 @@
 v.QE()}else this.iP=x
 x.WN(w)
 x.J7(new P.UO(this))
-return x},"call$1","gwk",2,0,null,344],
+return x},"call$1","gwk",2,0,null,346],
 j0:[function(a){var z,y
 if((this.Gv&8)!==0)this.iP.ed()
 this.iP=null
@@ -12754,27 +12749,27 @@
 call$0:[function(){var z=this.a.Ip
 if(z!=null&&z.Gv===0)z.OH(null)},"call$0",null,0,0,null,"call"],
 $isEH:true},
-VTt:{
+vp:{
 "":"a;",
-Iv:[function(a){this.ghG().Rg(0,a)},"call$1","gm9",2,0,null,300],
-pb:[function(a,b){this.ghG().V8(a,b)},"call$2","gTb",4,0,null,146,147],
-SY:[function(){this.ghG().Qj()},"call$0","gXm",0,0,null]},
+Iv:[function(a){this.gEe().Rg(0,a)},"call$1","gm9",2,0,null,237],
+pb:[function(a,b){this.gEe().V8(a,b)},"call$2","gTb",4,0,null,146,147],
+SY:[function(){this.gEe().Qj()},"call$0","gXm",0,0,null]},
 lk:{
 "":"a;",
-Iv:[function(a){this.ghG().w6(H.VM(new P.LV(a,null),[null]))},"call$1","gm9",2,0,null,300],
-pb:[function(a,b){this.ghG().w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,146,147],
-SY:[function(){this.ghG().w6(C.Wj)},"call$0","gXm",0,0,null]},
+Iv:[function(a){this.gEe().w6(H.VM(new P.LV(a,null),[null]))},"call$1","gm9",2,0,null,237],
+pb:[function(a,b){this.gEe().w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,146,147],
+SY:[function(){this.gEe().w6(C.Wj)},"call$0","gXm",0,0,null]},
 q1:{
-"":"Zd;nL<,p4<,Z9<,QC<,iP,Gv,Ip"},
-Zd:{
+"":"ZzD;nL<,p4<,Z9<,QC<,iP,Gv,Ip"},
+ZzD:{
 "":"ms+lk;"},
 ly:{
 "":"fE;nL<,p4<,Z9<,QC<,iP,Gv,Ip"},
 fE:{
-"":"ms+VTt;"},
+"":"ms+vp;"},
 O9:{
 "":"ez;Y8",
-w4:[function(a){return this.Y8.ET(a)},"call$1","gvC",2,0,null,344],
+w4:[function(a){return this.Y8.ET(a)},"call$1","gvC",2,0,null,346],
 giO:function(a){return(H.eQ(this.Y8)^892482866)>>>0},
 n:[function(a,b){var z
 if(b==null)return!1
@@ -12785,7 +12780,7 @@
 $isO9:true},
 yU:{
 "":"KA;Y8<,dB,o7,Bd,Lj,Gv,lz,Ri",
-tA:[function(){return this.gY8().j0(this)},"call$0","gQC",0,0,398],
+tA:[function(){return this.gY8().j0(this)},"call$0","gQC",0,0,400],
 uO:[function(){this.gY8().mO(this)},"call$0","gp4",0,0,107],
 LP:[function(){this.gY8().m4(this)},"call$0","gZ9",0,0,107]},
 nP:{
@@ -12795,17 +12790,17 @@
 WN:[function(a){if(a==null)return
 this.Ri=a
 if(!a.gl0(a)){this.Gv=(this.Gv|64)>>>0
-this.Ri.t2(this)}},"call$1","gNl",2,0,null,399],
-fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,400],
-fm:[function(a,b){if(b==null)b=P.bx()
+this.Ri.t2(this)}},"call$1","gNl",2,0,null,401],
+fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,402],
+fm:[function(a,b){if(b==null)b=P.AY()
 this.o7=P.VH(b,this.Lj)},"call$1","geO",2,0,null,29],
-pE:[function(a){if(a==null)a=P.Vj()
-this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,401],
+y5:[function(a){if(a==null)a=P.v3()
+this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,403],
 nB:[function(a,b){var z=this.Gv
 if((z&8)!==0)return
 this.Gv=(z+128|4)>>>0
 if(z<128&&this.Ri!=null)this.Ri.FK()
-if((z&4)===0&&(this.Gv&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,402],
+if((z&4)===0&&(this.Gv&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,404],
 QE:[function(){var z=this.Gv
 if((z&8)!==0)return
 if(z>=128){z-=128
@@ -12829,7 +12824,7 @@
 Rg:[function(a,b){var z=this.Gv
 if((z&8)!==0)return
 if(z<32)this.Iv(b)
-else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,300],
+else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,237],
 V8:[function(a,b){var z=this.Gv
 if((z&8)!==0)return
 if(z<32)this.pb(a,b)
@@ -12842,20 +12837,20 @@
 else this.w6(C.Wj)},"call$0","gS2",0,0,null],
 uO:[function(){},"call$0","gp4",0,0,107],
 LP:[function(){},"call$0","gZ9",0,0,107],
-tA:[function(){},"call$0","gQC",0,0,398],
+tA:[function(){},"call$0","gQC",0,0,400],
 w6:[function(a){var z,y
 z=this.Ri
-if(z==null){z=new P.ny(null,null,0)
+if(z==null){z=new P.Qk(null,null,0)
 this.Ri=z}z.h(0,a)
 y=this.Gv
 if((y&64)===0){y=(y|64)>>>0
 this.Gv=y
-if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,403],
+if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,405],
 Iv:[function(a){var z=this.Gv
 this.Gv=(z|32)>>>0
 this.Lj.m1(this.dB,a)
 this.Gv=(this.Gv&4294967263)>>>0
-this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,300],
+this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,237],
 pb:[function(a,b){var z,y,x
 z=this.Gv
 y=new P.Vo(this,a,b)
@@ -12895,7 +12890,7 @@
 if(y)this.uO()
 else this.LP()
 this.Gv=(this.Gv&4294967263)>>>0}z=this.Gv
-if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,404],
+if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,406],
 $isMO:true,
 static:{"":"ry,bG,nS,R7,yJ,X8,HX,GC,L3"}},
 Vo:{
@@ -12929,36 +12924,36 @@
 KR:[function(a,b,c,d){var z=this.w4(!0===b)
 z.fe(a)
 z.fm(0,d)
-z.pE(c)
-return z},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,343,344,345,156],
+z.y5(c)
+return z},function(a){return this.KR(a,null,null,null)},"yI",function(a,b,c){return this.KR(a,null,b,c)},"zC","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,345,346,347,156],
 w4:[function(a){var z,y
 z=$.X3
 y=a?1:0
 y=new P.KA(null,null,null,z,y,null,null)
 y.$builtinTypeInfo=this.$builtinTypeInfo
-return y},"call$1","gvC",2,0,null,344],
-F3:[function(a){},"call$1","gnL",2,0,405,157]},
+return y},"call$1","gvC",2,0,null,346],
+na:[function(a){},"call$1","gnL",2,0,407,157]},
 lx:{
 "":"a;LD@"},
 LV:{
 "":"lx;P>,LD",
 r6:function(a,b){return this.P.call$1(b)},
-pP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,406]},
+pP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,408]},
 DS:{
 "":"lx;kc>,I4<,LD",
-pP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,406]},
+pP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,408]},
 JF:{
 "":"a;",
-pP:[function(a){a.SY()},"call$1","gqp",2,0,null,406],
+pP:[function(a){a.SY()},"call$1","gqp",2,0,null,408],
 gLD:function(){return},
 sLD:function(a){throw H.b(new P.lj("No events after a done."))}},
-B3:{
+ht:{
 "":"a;",
 t2:[function(a){var z=this.Gv
 if(z===1)return
 if(z>=1){this.Gv=1
 return}P.rb(new P.CR(this,a))
-this.Gv=1},"call$1","gQu",2,0,null,406],
+this.Gv=1},"call$1","gQu",2,0,null,408],
 FK:[function(){if(this.Gv===1)this.Gv=3},"call$0","gTg",0,0,null]},
 CR:{
 "":"Tp:108;a,b",
@@ -12969,19 +12964,19 @@
 if(y===3)return
 z.TO(this.b)},"call$0",null,0,0,null,"call"],
 $isEH:true},
-ny:{
-"":"B3;zR,N6,Gv",
+Qk:{
+"":"ht;zR,N6,Gv",
 gl0:function(a){return this.N6==null},
 h:[function(a,b){var z=this.N6
 if(z==null){this.N6=b
 this.zR=b}else{z.sLD(b)
-this.N6=b}},"call$1","ght",2,0,null,403],
+this.N6=b}},"call$1","ght",2,0,null,405],
 TO:[function(a){var z,y
 z=this.zR
 y=z.gLD()
 this.zR=y
 if(y==null)this.N6=null
-z.pP(a)},"call$1","gTn",2,0,null,406],
+z.pP(a)},"call$1","gTn",2,0,null,408],
 V1:[function(a){if(this.Gv===1)this.Gv=3
 this.N6=null
 this.zR=null},"call$0","gyP",0,0,null]},
@@ -12990,7 +12985,7 @@
 call$0:[function(){return this.a.K5(this.b,this.c)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 uR:{
-"":"Tp:407;a,b",
+"":"Tp:409;a,b",
 call$2:[function(a,b){return P.NX(this.a,this.b,a,b)},"call$2",null,4,0,null,146,147,"call"],
 $isEH:true},
 QX:{
@@ -13006,35 +13001,35 @@
 x=$.X3
 w=b?1:0
 v=H.VM(new P.fB(this,null,null,null,null,x,w,null,null),[z,y])
-v.R9(this,b,z,y)
+v.S8(this,b,z,y)
 v.fe(a)
 v.fm(0,d)
-v.pE(c)
-return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,343,344,345,156],
-Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,300,408],
+v.y5(c)
+return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,345,346,347,156],
+Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,237,410],
 $asqh:function(a,b){return[b]}},
 fB:{
-"":"KA;UY,hG,dB,o7,Bd,Lj,Gv,lz,Ri",
+"":"KA;UY,Ee,dB,o7,Bd,Lj,Gv,lz,Ri",
 Rg:[function(a,b){if((this.Gv&2)!==0)return
-P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,300],
+P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,237],
 V8:[function(a,b){if((this.Gv&2)!==0)return
 P.KA.prototype.V8.call(this,a,b)},"call$2","grd",4,0,null,146,147],
-uO:[function(){var z=this.hG
+uO:[function(){var z=this.Ee
 if(z==null)return
 z.yy(0)},"call$0","gp4",0,0,107],
-LP:[function(){var z=this.hG
+LP:[function(){var z=this.Ee
 if(z==null)return
 z.QE()},"call$0","gZ9",0,0,107],
-tA:[function(){var z=this.hG
-if(z!=null){this.hG=null
-z.ed()}return},"call$0","gQC",0,0,398],
-vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},300],
-xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,409,146,147],
+tA:[function(){var z=this.Ee
+if(z!=null){this.Ee=null
+z.ed()}return},"call$0","gQC",0,0,400],
+vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},237],
+xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,411,146,147],
 nn:[function(){this.Qj()},"call$0","gH1",0,0,107],
-R9:function(a,b,c,d){var z,y
+S8:function(a,b,c,d){var z,y
 z=this.gOa()
 y=this.gRE()
-this.hG=this.UY.Sb.zC(z,this.gH1(),y)},
+this.Ee=this.UY.Sb.zC(z,this.gH1(),y)},
 $asKA:function(a,b){return[b]},
 $asMO:function(a,b){return[b]}},
 nO:{
@@ -13046,7 +13041,7 @@
 y=v
 x=new H.XO(w,null)
 b.V8(y,x)
-return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,410,408],
+return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,412,410],
 $asYR:function(a){return[a,a]},
 $asqh:null},
 t3:{
@@ -13058,26 +13053,26 @@
 y=v
 x=new H.XO(w,null)
 b.V8(y,x)
-return}J.QM(b,z)},"call$2","gOa",4,0,null,410,408]},
+return}J.QM(b,z)},"call$2","gOa",4,0,null,412,410]},
 dq:{
 "":"YR;Em,Sb",
 Ml:[function(a,b){var z=this.Em
 if(z>0){this.Em=z-1
-return}b.Rg(0,a)},"call$2","gOa",4,0,null,410,408],
+return}b.Rg(0,a)},"call$2","gOa",4,0,null,412,410],
 U6:function(a,b,c){},
 $asYR:function(a){return[a,a]},
 $asqh:null},
-dX:{
+tU:{
 "":"a;"},
 aY:{
 "":"a;"},
 zG:{
-"":"a;E2<,cP<,vo<,eo<,Ka<,Xp<,fb<,rb<,Zq<,NW,JS>,iq<",
+"":"a;E2<,cP<,Jl<,pU<,Fh<,Xp<,aj<,rb<,Zq<,rF,JS>,iq<",
 hk:function(a,b){return this.E2.call$2(a,b)},
 Gr:function(a){return this.cP.call$1(a)},
-Al:function(a){return this.Ka.call$1(a)},
+Al:function(a){return this.Fh.call$1(a)},
 cR:function(a){return this.Xp.call$1(a)},
-O8:function(a){return this.fb.call$1(a)},
+O8:function(a){return this.aj.call$1(a)},
 wr:function(a){return this.rb.call$1(a)},
 RK:function(a,b){return this.rb.call$2(a,b)},
 uN:function(a,b){return this.Zq.call$2(a,b)},
@@ -13090,55 +13085,55 @@
 Id:{
 "":"a;nU",
 gLj:function(){return this.nU},
-x5:[function(a,b,c){var z,y
+c1:[function(a,b,c){var z,y
 z=this.nU
-for(;y=z.gtp(),y.gE2()==null;)z=z.geT(z)
+for(;y=z.gzU(),y.gE2()==null;)z=z.geT(z)
 return y.gE2().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gE2",6,0,null,148,146,147],
 Vn:[function(a,b){var z,y
 z=this.nU
-for(;y=z.gtp(),y.gcP()==null;)z=z.geT(z)
+for(;y=z.gzU(),y.gcP()==null;)z=z.geT(z)
 return y.gcP().call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gcP",4,0,null,148,110],
 qG:[function(a,b,c){var z,y
 z=this.nU
-for(;y=z.gtp(),y.gvo()==null;)z=z.geT(z)
-return y.gvo().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gvo",6,0,null,148,110,165],
+for(;y=z.gzU(),y.gJl()==null;)z=z.geT(z)
+return y.gJl().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gJl",6,0,null,148,110,165],
 nA:[function(a,b,c,d){var z,y
 z=this.nU
-for(;y=z.gtp(),y.geo()==null;)z=z.geT(z)
-return y.geo().call$6(z,new P.Id(z.geT(z)),a,b,c,d)},"call$4","geo",8,0,null,148,110,54,55],
+for(;y=z.gzU(),y.gpU()==null;)z=z.geT(z)
+return y.gpU().call$6(z,new P.Id(z.geT(z)),a,b,c,d)},"call$4","gpU",8,0,null,148,110,54,55],
 TE:[function(a,b){var z,y
 z=this.nU
-for(;y=z.gtp().gKa(),y==null;)z=z.geT(z)
-return y.call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gKa",4,0,null,148,110],
-xO:[function(a,b){var z,y
+for(;y=z.gzU().gFh(),y==null;)z=z.geT(z)
+return y.call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gFh",4,0,null,148,110],
+V6:[function(a,b){var z,y
 z=this.nU
-for(;y=z.gtp().gXp(),y==null;)z=z.geT(z)
+for(;y=z.gzU().gXp(),y==null;)z=z.geT(z)
 return y.call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gXp",4,0,null,148,110],
-P6:[function(a,b){var z,y
+mz:[function(a,b){var z,y
 z=this.nU
-for(;y=z.gtp().gfb(),y==null;)z=z.geT(z)
-return y.call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gfb",4,0,null,148,110],
+for(;y=z.gzU().gaj(),y==null;)z=z.geT(z)
+return y.call$4(z,new P.Id(z.geT(z)),a,b)},"call$2","gaj",4,0,null,148,110],
 RK:[function(a,b){var z,y,x
 z=this.nU
-for(;y=z.gtp(),y.grb()==null;)z=z.geT(z)
+for(;y=z.gzU(),y.grb()==null;)z=z.geT(z)
 x=z.geT(z)
 y.grb().call$4(z,new P.Id(x),a,b)},"call$2","grb",4,0,null,148,110],
-B7:[function(a,b,c){var z,y
+dJ:[function(a,b,c){var z,y
 z=this.nU
-for(;y=z.gtp(),y.gZq()==null;)z=z.geT(z)
+for(;y=z.gzU(),y.gZq()==null;)z=z.geT(z)
 return y.gZq().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gZq",6,0,null,148,159,110],
 RB:[function(a,b,c){var z,y
 z=this.nU
-for(;y=z.gtp(),y.gJS(y)==null;)z=z.geT(z)
+for(;y=z.gzU(),y.gJS(y)==null;)z=z.geT(z)
 y.gJS(y).call$4(z,new P.Id(z.geT(z)),b,c)},"call$2","gJS",4,0,null,148,173],
-ld:[function(a,b,c){var z,y,x
+GT:[function(a,b,c){var z,y,x
 z=this.nU
-for(;y=z.gtp(),y.giq()==null;)z=z.geT(z)
+for(;y=z.gzU(),y.giq()==null;)z=z.geT(z)
 x=z.geT(z)
 return y.giq().call$5(z,new P.Id(x),a,b,c)},"call$3","giq",6,0,null,148,176,177]},
 WH:{
 "":"a;",
-fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,411],
+fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,413],
 bH:[function(a){var z,y,x,w
 try{x=this.Gr(a)
 return x}catch(w){x=H.Ru(w)
@@ -13159,13 +13154,13 @@
 return this.hk(z,y)}},"call$3","gLG",6,0,null,110,54,55],
 xi:[function(a,b){var z=this.Al(a)
 if(b)return new P.TF(this,z)
-else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,335,110,412],
+else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,337,110,414],
 oj:[function(a,b){var z=this.cR(a)
 if(b)return new P.Cg(this,z)
-else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,335,110,412],
+else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,337,110,414],
 PT:[function(a,b){var z=this.O8(a)
 if(b)return new P.dv(this,z)
-else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,335,110,412]},
+else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,337,110,414]},
 TF:{
 "":"Tp:108;a,b",
 call$0:[function(){return this.a.bH(this.b)},"call$0",null,0,0,null,"call"],
@@ -13183,31 +13178,31 @@
 call$1:[function(a){return this.c.FI(this.d,a)},"call$1",null,2,0,null,165,"call"],
 $isEH:true},
 dv:{
-"":"Tp:347;a,b",
+"":"Tp:349;a,b",
 call$2:[function(a,b){return this.a.z8(this.b,a,b)},"call$2",null,4,0,null,54,55,"call"],
 $isEH:true},
 pV:{
-"":"Tp:347;c,d",
+"":"Tp:349;c,d",
 call$2:[function(a,b){return this.c.mg(this.d,a,b)},"call$2",null,4,0,null,54,55,"call"],
 $isEH:true},
-uo:{
-"":"WH;eT>,tp<,Se",
+cc:{
+"":"WH;eT>,zU<,R1",
 gC5:function(){return this.eT.gC5()},
 t:[function(a,b){var z,y
-z=this.Se
+z=this.R1
 y=z.t(0,b)
 if(y!=null||z.x4(b))return y
 return this.eT.t(0,b)},"call$1","gIA",2,0,null,42],
-hk:[function(a,b){return new P.Id(this).x5(this,a,b)},"call$2","gE2",4,0,null,146,147],
-c6:[function(a,b){return new P.Id(this).ld(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,177],
+hk:[function(a,b){return new P.Id(this).c1(this,a,b)},"call$2","gE2",4,0,null,146,147],
+c6:[function(a,b){return new P.Id(this).GT(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,177],
 Gr:[function(a){return new P.Id(this).Vn(this,a)},"call$1","gcP",2,0,null,110],
-FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gvo",4,0,null,110,165],
-mg:[function(a,b,c){return new P.Id(this).nA(this,a,b,c)},"call$3","geo",6,0,null,110,54,55],
-Al:[function(a){return new P.Id(this).TE(this,a)},"call$1","gKa",2,0,null,110],
-cR:[function(a){return new P.Id(this).xO(this,a)},"call$1","gXp",2,0,null,110],
-O8:[function(a){return new P.Id(this).P6(this,a)},"call$1","gfb",2,0,null,110],
+FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gJl",4,0,null,110,165],
+mg:[function(a,b,c){return new P.Id(this).nA(this,a,b,c)},"call$3","gpU",6,0,null,110,54,55],
+Al:[function(a){return new P.Id(this).TE(this,a)},"call$1","gFh",2,0,null,110],
+cR:[function(a){return new P.Id(this).V6(this,a)},"call$1","gXp",2,0,null,110],
+O8:[function(a){return new P.Id(this).mz(this,a)},"call$1","gaj",2,0,null,110],
 wr:[function(a){new P.Id(this).RK(this,a)},"call$1","grb",2,0,null,110],
-uN:[function(a,b){return new P.Id(this).B7(this,a,b)},"call$2","gZq",4,0,null,159,110],
+uN:[function(a,b){return new P.Id(this).dJ(this,a,b)},"call$2","gZq",4,0,null,159,110],
 Ch:[function(a,b){new P.Id(this).RB(0,this,b)},"call$1","gJS",2,0,null,173]},
 pK:{
 "":"Tp:108;a,b",
@@ -13226,8 +13221,8 @@
 throw H.b(z)},"call$0",null,0,0,null,"call"],
 $isEH:true},
 Uez:{
-"":"Tp:382;a",
-call$2:[function(a,b){if(a==null)throw H.b(P.u("ZoneValue key must not be null"))
+"":"Tp:384;a",
+call$2:[function(a,b){if(a==null)throw H.b(new P.AT("ZoneValue key must not be null"))
 this.a.u(0,a,b)},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true},
 W5:{
@@ -13236,38 +13231,38 @@
 hk:function(a,b){return this.gE2().call$2(a,b)},
 gcP:function(){return P.AI()},
 Gr:function(a){return this.gcP().call$1(a)},
-gvo:function(){return P.MM()},
-geo:function(){return P.C9()},
-gKa:function(){return P.Qk()},
-Al:function(a){return this.gKa().call$1(a)},
+gJl:function(){return P.MM()},
+gpU:function(){return P.l4()},
+gFh:function(){return P.EU()},
+Al:function(a){return this.gFh().call$1(a)},
 gXp:function(){return P.zi()},
 cR:function(a){return this.gXp().call$1(a)},
-gfb:function(){return P.v3()},
-O8:function(a){return this.gfb().call$1(a)},
+gaj:function(){return P.uu()},
+O8:function(a){return this.gaj().call$1(a)},
 grb:function(){return P.G2()},
 wr:function(a){return this.grb().call$1(a)},
 RK:function(a,b){return this.grb().call$2(a,b)},
 gZq:function(){return P.KF()},
 uN:function(a,b){return this.gZq().call$2(a,b)},
-gJS:function(a){return P.ZB()},
+gJS:function(a){return P.YM()},
 Ch:function(a,b){return this.gJS(a).call$1(b)},
-giq:function(){return P.LS()},
+giq:function(){return P.hn()},
 iT:function(a){return this.giq().call$1$specification(a)}},
 R8:{
 "":"WH;",
 geT:function(a){return},
-gtp:function(){return C.v8},
+gzU:function(){return C.v8},
 gC5:function(){return this},
-fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,411],
+fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,413],
 t:[function(a,b){return},"call$1","gIA",2,0,null,42],
 hk:[function(a,b){return P.L2(this,null,this,a,b)},"call$2","gE2",4,0,null,146,147],
-c6:[function(a,b){return P.qc(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,177],
+c6:[function(a,b){return P.UA(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,177],
 Gr:[function(a){return P.T8(this,null,this,a)},"call$1","gcP",2,0,null,110],
-FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gvo",4,0,null,110,165],
-mg:[function(a,b,c){return P.Qx(this,null,this,a,b,c)},"call$3","geo",6,0,null,110,54,55],
-Al:[function(a){return a},"call$1","gKa",2,0,null,110],
+FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gJl",4,0,null,110,165],
+mg:[function(a,b,c){return P.Qx(this,null,this,a,b,c)},"call$3","gpU",6,0,null,110,54,55],
+Al:[function(a){return a},"call$1","gFh",2,0,null,110],
 cR:[function(a){return a},"call$1","gXp",2,0,null,110],
-O8:[function(a){return a},"call$1","gfb",2,0,null,110],
+O8:[function(a){return a},"call$1","gaj",2,0,null,110],
 wr:[function(a){P.Tk(this,null,this,a)},"call$1","grb",2,0,null,110],
 uN:[function(a,b){return P.h8(this,null,this,a,b)},"call$2","gZq",4,0,null,159,110],
 Ch:[function(a,b){H.qw(b)
@@ -13280,6 +13275,7 @@
 z.$builtinTypeInfo=[d,e]
 return z}b=P.py()
 return P.MP(a,b,c,d,e)},
+UD:function(a,b){return H.VM(new P.PL(0,null,null,null,null),[a,b])},
 yv:function(a){return H.VM(new P.YO(0,null,null,null,null),[a])},
 FO:[function(a){var z,y
 if($.xb().tg(0,a))return"(...)"
@@ -13295,19 +13291,19 @@
 x=0
 while(!0){if(!(y<80||x<3))break
 if(!z.G())return
-w=H.d(z.gl(z))
+w=H.d(z.gl())
 b.push(w)
 y+=w.length+2;++x}if(!z.G()){if(x<=5)return
 if(0>=b.length)return H.e(b,0)
 v=b.pop()
 if(0>=b.length)return H.e(b,0)
-u=b.pop()}else{t=z.gl(z);++x
+u=b.pop()}else{t=z.gl();++x
 if(!z.G()){if(x<=4){b.push(H.d(t))
 return}v=H.d(t)
 if(0>=b.length)return H.e(b,0)
 u=b.pop()
-y+=v.length+2}else{s=z.gl(z);++x
-for(;z.G();t=s,s=r){r=z.gl(z);++x
+y+=v.length+2}else{s=z.gl();++x
+for(;z.G();t=s,s=r){r=z.gl();++x
 if(x>100){while(!0){if(!(y>75&&x>3))break
 if(0>=b.length)return H.e(b,0)
 y-=b.pop().length+2;--x}b.push("...")
@@ -13333,7 +13329,7 @@
 try{$.tw().push(a)
 y.KF("{")
 z.a=!0
-J.kH(a,new P.W0(z,y))
+J.kH(a,new P.ZQ(z,y))
 y.KF("}")}finally{z=$.tw()
 if(0>=z.length)return H.e(z,0)
 z.pop()}return y.gvM()},"call$1","DH",2,0,null,183],
@@ -13350,10 +13346,10 @@
 return y==null?!1:y[a]!=null}else{x=this.OB
 if(x==null)return!1
 return this.aH(x[this.nm(a)],a)>=0}},"call$1","gV9",2,0,null,42],
-PF:[function(a){var z=this.Ig()
+di:[function(a){var z=this.Ig()
 z.toString
-return H.Ck(z,new P.LF(this,a))},"call$1","gmc",2,0,null,23],
-Ay:[function(a,b){J.kH(b,new P.DJ(this))},"call$1","gDY",2,0,null,104],
+return H.Ck(z,new P.ce(this,a))},"call$1","gmc",2,0,null,23],
+FV:[function(a,b){J.kH(b,new P.DJ(this))},"call$1","gDY",2,0,null,104],
 t:[function(a,b){var z,y,x,w,v,u,t
 if(typeof b==="string"&&b!=="__proto__"){z=this.vv
 if(z==null)y=null
@@ -13420,7 +13416,7 @@
 z=this.Ig()
 for(y=z.length,x=0;x<y;++x){w=z[x]
 b.call$2(w,this.t(0,w))
-if(z!==this.aw)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,376],
+if(z!==this.aw)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378],
 Ig:[function(){var z,y,x,w,v,u,t,s,r,q,p,o
 z=this.aw
 if(z!=null)return z
@@ -13451,24 +13447,32 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;y+=2)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,413,42],
-$isL8:true,
+return-1},"call$2","gSP",4,0,null,415,42],
+$isZ0:true,
 static:{vL:[function(a,b){var z=a[b]
 return z===a?null:z},"call$2","ME",4,0,null,178,42]}},
 oi:{
 "":"Tp:229;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,414,"call"],
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,416,"call"],
 $isEH:true},
-LF:{
+ce:{
 "":"Tp:229;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,414,"call"],
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,416,"call"],
 $isEH:true},
 DJ:{
 "":"Tp;a",
 call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true,
 $signature:function(){return H.IG(function(a,b){return{func:"vP",args:[a,b]}},this.a,"k6")}},
-o2:{
+PL:{
+"":"k6;X5,vv,OX,OB,aw",
+nm:[function(a){return H.CU(a)&0x3ffffff},"call$1","gtU",2,0,null,42],
+aH:[function(a,b){var z,y,x
+if(a==null)return-1
+z=a.length
+for(y=0;y<z;y+=2){x=a[y]
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,415,42]},
+Fq:{
 "":"k6;m6,Q6,ac,X5,vv,OX,OB,aw",
 C2:function(a,b){return this.m6.call$2(a,b)},
 H5:function(a){return this.Q6.call$1(a)},
@@ -13484,14 +13488,14 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;y+=2)if(this.C2(a[y],b)===!0)return y
-return-1},"call$2","gSP",4,0,null,413,42],
+return-1},"call$2","gSP",4,0,null,415,42],
 bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
 static:{MP:function(a,b,c,d,e){var z=new P.jG(d)
-return H.VM(new P.o2(a,b,z,0,null,null,null,null),[d,e])}}},
+return H.VM(new P.Fq(a,b,z,0,null,null,null,null),[d,e])}}},
 jG:{
 "":"Tp:229;a",
 call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,273,"call"],
+return z},"call$1",null,2,0,null,277,"call"],
 $isEH:true},
 fG:{
 "":"mW;Fb",
@@ -13510,8 +13514,7 @@
 $isyN:true},
 EQ:{
 "":"a;Fb,aw,zi,fD",
-gl:function(a){return this.fD},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.fD},
 G:[function(){var z,y,x
 z=this.aw
 y=this.zi
@@ -13526,8 +13529,8 @@
 gB:function(a){return this.X5},
 gl0:function(a){return this.X5===0},
 gor:function(a){return this.X5!==0},
-gvc:function(a){return H.VM(new P.Cm(this),[H.Kp(this,0)])},
-gUQ:function(a){return H.K1(H.VM(new P.Cm(this),[H.Kp(this,0)]),new P.a1(this),H.Kp(this,0),H.Kp(this,1))},
+gvc:function(a){return H.VM(new P.i5(this),[H.Kp(this,0)])},
+gUQ:function(a){return H.K1(H.VM(new P.i5(this),[H.Kp(this,0)]),new P.a1(this),H.Kp(this,0),H.Kp(this,1))},
 x4:[function(a){var z,y,x
 if(typeof a==="string"&&a!=="__proto__"){z=this.vv
 if(z==null)return!1
@@ -13536,8 +13539,8 @@
 return y[a]!=null}else{x=this.OB
 if(x==null)return!1
 return this.aH(x[this.nm(a)],a)>=0}},"call$1","gV9",2,0,null,42],
-PF:[function(a){return H.VM(new P.Cm(this),[H.Kp(this,0)]).Vr(0,new P.ou(this,a))},"call$1","gmc",2,0,null,23],
-Ay:[function(a,b){J.kH(b,new P.S9(this))},"call$1","gDY",2,0,null,104],
+di:[function(a){return H.VM(new P.i5(this),[H.Kp(this,0)]).Vr(0,new P.ou(this,a))},"call$1","gmc",2,0,null,23],
+FV:[function(a,b){J.kH(b,new P.S9(this))},"call$1","gDY",2,0,null,104],
 t:[function(a,b){var z,y,x,w,v,u
 if(typeof b==="string"&&b!=="__proto__"){z=this.vv
 if(z==null)return
@@ -13558,14 +13561,14 @@
 delete y["<non-identifier-key>"]
 this.vv=y
 z=y}x=z[b]
-if(x==null)z[b]=this.y5(b,c)
+if(x==null)z[b]=this.pE(b,c)
 else x.sS4(c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){w=this.OX
 if(w==null){y=Object.create(null)
 y["<non-identifier-key>"]=y
 delete y["<non-identifier-key>"]
 this.OX=y
 w=y}x=w[b]
-if(x==null)w[b]=this.y5(b,c)
+if(x==null)w[b]=this.pE(b,c)
 else x.sS4(c)}else{v=this.OB
 if(v==null){y=Object.create(null)
 y["<non-identifier-key>"]=y
@@ -13573,15 +13576,15 @@
 this.OB=y
 v=y}u=this.nm(b)
 t=v[u]
-if(t==null)v[u]=[this.y5(b,c)]
+if(t==null)v[u]=[this.pE(b,c)]
 else{s=this.aH(t,b)
 if(s>=0)t[s].sS4(c)
-else t.push(this.y5(b,c))}}},"call$2","gj3",4,0,null,42,23],
+else t.push(this.pE(b,c))}}},"call$2","gj3",4,0,null,42,23],
 to:[function(a,b){var z
 if(this.x4(a))return this.t(0,a)
 z=b.call$0()
 this.u(0,a,z)
-return z},"call$2","gMs",4,0,null,42,415],
+return z},"call$2","gMs",4,0,null,42,417],
 Rz:[function(a,b){var z,y,x,w
 if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
 else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -13605,7 +13608,7 @@
 y=this.zN
 for(;z!=null;){b.call$2(z.gkh(),z.gS4())
 if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gAn()}},"call$1","gjw",2,0,null,376],
+z=z.gDG()}},"call$1","gjw",2,0,null,378],
 Nv:[function(a,b){var z
 if(a==null)return
 z=a[b]
@@ -13613,40 +13616,40 @@
 this.Vb(z)
 delete a[b]
 return z.gS4()},"call$2","got",4,0,null,178,42],
-y5:[function(a,b){var z,y
+pE:[function(a,b){var z,y
 z=new P.db(a,b,null,null)
 if(this.H9==null){this.lX=z
 this.H9=z}else{y=this.lX
 z.zQ=y
-y.sAn(z)
+y.sDG(z)
 this.lX=z}this.X5=this.X5+1
 this.zN=this.zN+1&67108863
 return z},"call$2","gTM",4,0,null,42,23],
 Vb:[function(a){var z,y
 z=a.gzQ()
-y=a.gAn()
+y=a.gDG()
 if(z==null)this.H9=y
-else z.sAn(y)
+else z.sDG(y)
 if(y==null)this.lX=z
 else y.szQ(z)
 this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,416],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,418],
 nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,42],
 aH:[function(a,b){var z,y
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y)if(J.de(a[y].gkh(),b))return y
-return-1},"call$2","gSP",4,0,null,413,42],
+return-1},"call$2","gSP",4,0,null,415,42],
 bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
 $isFo:true,
-$isL8:true},
+$isZ0:true},
 a1:{
 "":"Tp:229;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,414,"call"],
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,416,"call"],
 $isEH:true},
 ou:{
 "":"Tp:229;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,414,"call"],
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,416,"call"],
 $isEH:true},
 S9:{
 "":"Tp;a",
@@ -13660,7 +13663,7 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y){x=a[y].gkh()
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,413,42]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,415,42]},
 xd:{
 "":"YB;m6,Q6,ac,X5,vv,OX,OB,H9,lX,zN",
 C2:function(a,b){return this.m6.call$2(a,b)},
@@ -13677,17 +13680,17 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y)if(this.C2(a[y].gkh(),b)===!0)return y
-return-1},"call$2","gSP",4,0,null,413,42],
+return-1},"call$2","gSP",4,0,null,415,42],
 static:{Ex:function(a,b,c,d,e){var z=new P.v6(d)
 return H.VM(new P.xd(a,b,z,0,null,null,null,null,null,0),[d,e])}}},
 v6:{
 "":"Tp:229;a",
 call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,273,"call"],
+return z},"call$1",null,2,0,null,277,"call"],
 $isEH:true},
 db:{
-"":"a;kh<,S4@,An@,zQ@"},
-Cm:{
+"":"a;kh<,S4@,DG@,zQ@"},
+i5:{
 "":"mW;Fb",
 gB:function(a){return this.Fb.X5},
 gl0:function(a){return this.Fb.X5===0},
@@ -13704,18 +13707,17 @@
 x=z.zN
 for(;y!=null;){b.call$1(y.gkh())
 if(x!==z.zN)throw H.b(P.a4(z))
-y=y.gAn()}},"call$1","gjw",2,0,null,110],
+y=y.gDG()}},"call$1","gjw",2,0,null,110],
 $isyN:true},
 N6:{
 "":"a;Fb,zN,zq,fD",
-gl:function(a){return this.fD},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.fD},
 G:[function(){var z=this.Fb
 if(this.zN!==z.zN)throw H.b(P.a4(z))
 else{z=this.zq
 if(z==null){this.fD=null
 return!1}else{this.fD=z.gkh()
-this.zq=this.zq.gAn()
+this.zq=this.zq.gDG()
 return!0}}},"call$0","guK",0,0,null]},
 Rr:{
 "":"lN;",
@@ -13764,8 +13766,8 @@
 u.push(b)}this.X5=this.X5+1
 this.DM=null
 return!0}},"call$1","ght",2,0,null,124],
-Ay:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl(z))},"call$1","gDY",2,0,null,417],
+FV:[function(a,b){var z
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,419],
 Rz:[function(a,b){var z,y,x
 if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
 else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -13816,7 +13818,7 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,413,124],
+return-1},"call$2","gSP",4,0,null,415,124],
 $isyN:true,
 $iscX:true,
 $ascX:null},
@@ -13827,11 +13829,10 @@
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y){x=a[y]
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,413,124]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,415,124]},
 oz:{
 "":"a;O2,DM,zi,fD",
-gl:function(a){return this.fD},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.fD},
 G:[function(){var z,y,x
 z=this.DM
 y=this.zi
@@ -13872,7 +13873,7 @@
 y=this.zN
 for(;z!=null;){b.call$1(z.gGc())
 if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gAn()}},"call$1","gjw",2,0,null,376],
+z=z.gDG()}},"call$1","gjw",2,0,null,378],
 grZ:function(a){var z=this.lX
 if(z==null)throw H.b(new P.lj("No elements"))
 return z.gGc()},
@@ -13897,8 +13898,8 @@
 if(u==null)w[v]=[this.xf(b)]
 else{if(this.aH(u,b)>=0)return!1
 u.push(this.xf(b))}return!0}},"call$1","ght",2,0,null,124],
-Ay:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl(z))},"call$1","gDY",2,0,null,417],
+FV:[function(a,b){var z
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,419],
 Rz:[function(a,b){var z,y,x
 if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
 else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -13927,44 +13928,43 @@
 delete a[b]
 return!0},"call$2","got",4,0,null,178,124],
 xf:[function(a){var z,y
-z=new P.tj(a,null,null)
+z=new P.ef(a,null,null)
 if(this.H9==null){this.lX=z
 this.H9=z}else{y=this.lX
 z.zQ=y
-y.sAn(z)
+y.sDG(z)
 this.lX=z}this.X5=this.X5+1
 this.zN=this.zN+1&67108863
 return z},"call$1","gTM",2,0,null,124],
 Vb:[function(a){var z,y
 z=a.gzQ()
-y=a.gAn()
+y=a.gDG()
 if(z==null)this.H9=y
-else z.sAn(y)
+else z.sDG(y)
 if(y==null)this.lX=z
 else y.szQ(z)
 this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,416],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,418],
 nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,124],
 aH:[function(a,b){var z,y
 if(a==null)return-1
 z=a.length
 for(y=0;y<z;++y)if(J.de(a[y].gGc(),b))return y
-return-1},"call$2","gSP",4,0,null,413,124],
+return-1},"call$2","gSP",4,0,null,415,124],
 $isyN:true,
 $iscX:true,
 $ascX:null},
-tj:{
-"":"a;Gc<,An@,zQ@"},
+ef:{
+"":"a;Gc<,DG@,zQ@"},
 zQ:{
 "":"a;O2,zN,zq,fD",
-gl:function(a){return this.fD},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.fD},
 G:[function(){var z=this.O2
 if(this.zN!==z.zN)throw H.b(P.a4(z))
 else{z=this.zq
 if(z==null){this.fD=null
 return!1}else{this.fD=z.gGc()
-this.zq=this.zq.gAn()
+this.zq=this.zq.gDG()
 return!0}}},"call$0","guK",0,0,null]},
 Yp:{
 "":"Iy;G4",
@@ -13976,10 +13976,10 @@
 if(b){z=H.VM([],[H.Kp(this,0)])
 C.Nm.sB(z,this.gB(this))}else{y=Array(this.gB(this))
 y.fixed$length=init
-z=H.VM(y,[H.Kp(this,0)])}for(y=this.gA(this),x=0;y.G();x=v){w=y.gl(y)
+z=H.VM(y,[H.Kp(this,0)])}for(y=this.gA(this),x=0;y.G();x=v){w=y.gl()
 v=x+1
 if(x>=z.length)return H.e(z,x)
-z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 bu:[function(a){return H.mx(this,"{","}")},"call$0","gXo",0,0,null],
 $isyN:true,
 $iscX:true,
@@ -13989,46 +13989,46 @@
 ez:[function(a,b){return H.K1(this,b,H.ip(this,"mW",0),null)},"call$1","gIr",2,0,null,110],
 ev:[function(a,b){return H.VM(new H.U5(this,b),[H.ip(this,"mW",0)])},"call$1","gIR",2,0,null,110],
 tg:[function(a,b){var z
-for(z=this.gA(this);z.G();)if(J.de(z.gl(z),b))return!0
+for(z=this.gA(this);z.G();)if(J.de(z.gl(),b))return!0
 return!1},"call$1","gdj",2,0,null,124],
 aN:[function(a,b){var z
-for(z=this.gA(this);z.G();)b.call$1(z.gl(z))},"call$1","gjw",2,0,null,110],
+for(z=this.gA(this);z.G();)b.call$1(z.gl())},"call$1","gjw",2,0,null,110],
 zV:[function(a,b){var z,y,x
 z=this.gA(this)
 if(!z.G())return""
 y=P.p9("")
-if(b==="")do{x=H.d(z.gl(z))
+if(b==="")do{x=H.d(z.gl())
 y.vM=y.vM+x}while(z.G())
-else{y.KF(H.d(z.gl(z)))
+else{y.KF(H.d(z.gl()))
 for(;z.G();){y.vM=y.vM+b
-x=H.d(z.gl(z))
-y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,332,333],
+x=H.d(z.gl())
+y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,334,335],
 Vr:[function(a,b){var z
-for(z=this.gA(this);z.G();)if(b.call$1(z.gl(z))===!0)return!0
+for(z=this.gA(this);z.G();)if(b.call$1(z.gl())===!0)return!0
 return!1},"call$1","gG2",2,0,null,110],
-tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 gB:function(a){var z,y
 z=this.gA(this)
 for(y=0;z.G();)++y
 return y},
 gl0:function(a){return!this.gA(this).G()},
 gor:function(a){return this.gl0(this)!==!0},
-eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gVQ",2,0,null,288],
-gFV:function(a){var z=this.gA(this)
+eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gVQ",2,0,null,292],
+gtH:function(a){var z=this.gA(this)
 if(!z.G())throw H.b(new P.lj("No elements"))
-return z.gl(z)},
+return z.gl()},
 grZ:function(a){var z,y
 z=this.gA(this)
 if(!z.G())throw H.b(new P.lj("No elements"))
-do y=z.gl(z)
+do y=z.gl()
 while(z.G())
 return y},
 qA:[function(a,b,c){var z,y
-for(z=this.gA(this);z.G();){y=z.gl(z)
-if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gpB",2,3,null,77,377,418],
+for(z=this.gA(this);z.G();){y=z.gl()
+if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gyo",2,3,null,77,379,420],
 Zv:[function(a,b){var z,y,x,w
 if(typeof b!=="number"||Math.floor(b)!==b||b<0)throw H.b(P.N(b))
-for(z=this.gA(this),y=b;z.G();){x=z.gl(z)
+for(z=this.gA(this),y=b;z.G();){x=z.gl()
 w=J.x(y)
 if(w.n(y,0))return x
 y=w.W(y,1)}throw H.b(P.N(b))},"call$1","goY",2,0,null,47],
@@ -14051,7 +14051,7 @@
 if(typeof z!=="number")return H.s(z)
 y=0
 for(;y<z;++y){b.call$1(this.t(a,y))
-if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,376],
+if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,378],
 gl0:function(a){return J.de(this.gB(a),0)},
 gor:function(a){return!this.gl0(a)},
 grZ:function(a){if(J.de(this.gB(a),0))throw H.b(new P.lj("No elements"))
@@ -14067,7 +14067,7 @@
 if(typeof z!=="number")return H.s(z)
 y=0
 for(;y<z;++y){if(b.call$1(this.t(a,y))===!0)return!0
-if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,377],
+if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,379],
 zV:[function(a,b){var z,y,x,w,v,u
 z=this.gB(a)
 if(b.length!==0){y=J.x(z)
@@ -14087,8 +14087,8 @@
 for(;v<z;++v){u=this.t(a,v)
 u=typeof u==="string"?u:H.d(u)
 w.vM=w.vM+u
-if(z!==this.gB(a))throw H.b(P.a4(a))}return w.vM}},"call$1","gnr",0,2,null,332,333],
-ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,377],
+if(z!==this.gB(a))throw H.b(P.a4(a))}return w.vM}},"call$1","gnr",0,2,null,334,335],
+ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,379],
 ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110],
 eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gVQ",2,0,null,122],
 tt:[function(a,b){var z,y,x
@@ -14103,12 +14103,12 @@
 if(!(x<y))break
 y=this.t(a,x)
 if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 h:[function(a,b){var z=this.gB(a)
 this.sB(a,J.WB(z,1))
 this.u(a,z,b)},"call$1","ght",2,0,null,124],
-Ay:[function(a,b){var z,y,x
-for(z=J.GP(b);z.G();){y=z.gl(z)
+FV:[function(a,b){var z,y,x
+for(z=J.GP(b);z.G();){y=z.gl()
 x=this.gB(a)
 this.sB(a,J.WB(x,1))
 this.u(a,x,y)}},"call$1","gDY",2,0,null,109],
@@ -14138,7 +14138,7 @@
 if(x>=y.length)return H.e(y,x)
 y[x]=w}return y},function(a,b){return this.D6(a,b,null)},"Jk","call$2",null,"gli",2,2,null,77,115,116],
 Mu:[function(a,b,c){this.pZ(a,b,c)
-return H.j5(a,b,c,null)},"call$2","gRP",4,0,null,115,116],
+return H.j5(a,b,c,null)},"call$2","gYf",4,0,null,115,116],
 YW:[function(a,b,c,d,e){var z,y,x,w
 z=this.gB(a)
 if(typeof z!=="number")return H.s(z)
@@ -14154,7 +14154,7 @@
 if(typeof x!=="number")return H.s(x)
 if(e+y>x)throw H.b(new P.lj("Not enough elements"))
 if(e<b)for(w=y-1;w>=0;--w)this.u(a,b+w,z.t(d,e+w))
-else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,334,115,116,109,117],
+else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,336,115,116,109,117],
 XU:[function(a,b,c){var z,y
 z=this.gB(a)
 if(typeof z!=="number")return H.s(z)
@@ -14163,7 +14163,7 @@
 while(!0){z=this.gB(a)
 if(typeof z!=="number")return H.s(z)
 if(!(y<z))break
-if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,334,124,80],
+if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,336,124,80],
 Pk:[function(a,b,c){var z,y
 c=J.xH(this.gB(a),1)
 for(z=c;y=J.Wx(z),y.F(z,0);z=y.W(z,1))if(J.de(this.t(a,z),b))return z
@@ -14180,15 +14180,15 @@
 $isyN:true,
 $iscX:true,
 $ascX:null},
-W0:{
-"":"Tp:347;a,b",
+ZQ:{
+"":"Tp:349;a,b",
 call$2:[function(a,b){var z=this.a
 if(!z.a)this.b.KF(", ")
 z.a=!1
 z=this.b
 z.KF(a)
 z.KF(": ")
-z.KF(b)},"call$2",null,4,0,null,419,273,"call"],
+z.KF(b)},"call$2",null,4,0,null,421,277,"call"],
 $isEH:true},
 Sw:{
 "":"mW;v5,av,HV,qT",
@@ -14200,7 +14200,7 @@
 for(y=this.av;y!==this.HV;y=(y+1&this.v5.length-1)>>>0){x=this.v5
 if(y<0||y>=x.length)return H.e(x,y)
 b.call$1(x[y])
-if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,376],
+if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,378],
 gl0:function(a){return this.av===this.HV},
 gB:function(a){return J.KV(J.xH(this.HV,this.av),this.v5.length-1)},
 grZ:function(a){var z,y
@@ -14226,9 +14226,9 @@
 C.Nm.sB(z,this.gB(this))}else{y=Array(this.gB(this))
 y.fixed$length=init
 z=H.VM(y,[H.Kp(this,0)])}this.e4(z)
-return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,335,336],
+return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,337,338],
 h:[function(a,b){this.NZ(0,b)},"call$1","ght",2,0,null,124],
-Ay:[function(a,b){var z,y,x,w,v,u,t,s,r
+FV:[function(a,b){var z,y,x,w,v,u,t,s,r
 z=J.x(b)
 if(typeof b==="object"&&b!==null&&(b.constructor===Array||!!z.$isList)){y=z.gB(b)
 x=this.gB(this)
@@ -14253,7 +14253,7 @@
 H.qG(w,z,z+s,b,0)
 z=this.v5
 H.qG(z,0,r,b,s)
-this.HV=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl(z))},"call$1","gDY",2,0,null,420],
+this.HV=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl())},"call$1","gDY",2,0,null,422],
 Rz:[function(a,b){var z,y
 for(z=this.av;z!==this.HV;z=(z+1&this.v5.length-1)>>>0){y=this.v5
 if(z<0||z>=y.length)return H.e(y,z)
@@ -14315,7 +14315,7 @@
 if(v<0||v>=w)return H.e(x,v)
 x[v]=t}if(y>=w)return H.e(x,y)
 x[y]=null
-return a}},"call$1","gzv",2,0,null,421],
+return a}},"call$1","gzv",2,0,null,423],
 e4:[function(a){var z,y,x,w
 z=this.av
 y=this.HV
@@ -14345,8 +14345,7 @@
 if(z===0)return a}},"call$1","bD",2,0,null,184]}},
 o0:{
 "":"a;Lz,dP,qT,Dc,fD",
-gl:function(a){return this.fD},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
+gl:function(){return this.fD},
 G:[function(){var z,y,x
 z=this.Lz
 if(this.qT!==z.qT)H.vh(P.a4(z))
@@ -14376,7 +14375,7 @@
 if(u.D(v,0)){u=z.Bb
 if(u==null)break
 v=this.yV(u.G3,a)
-if(J.xZ(v,0)){t=z.Bb
+if(J.z8(v,0)){t=z.Bb
 z.Bb=t.T8
 t.T8=z
 if(t.Bb==null){z=t
@@ -14404,12 +14403,12 @@
 return v},"call$1","gST",2,0,null,42],
 Xu:[function(a){var z,y
 for(z=a;y=z.T8,y!=null;z=y){z.T8=y.Bb
-y.Bb=z}return z},"call$1","gOv",2,0,null,261],
+y.Bb=z}return z},"call$1","gOv",2,0,null,265],
 bB:[function(a){var z,y,x
 if(this.aY==null)return
 if(!J.de(this.vh(a),0))return
 z=this.aY
-this.J0=this.J0-1
+this.P6=this.P6-1
 y=z.Bb
 x=z.T8
 if(y==null)this.aY=x
@@ -14418,7 +14417,7 @@
 y.T8=x}this.qT=this.qT+1
 return z},"call$1","gzv",2,0,null,42],
 K8:[function(a,b){var z,y
-this.J0=this.J0+1
+this.P6=this.P6+1
 this.qT=this.qT+1
 if(this.aY==null){this.aY=a
 return}z=J.u6(b,0)
@@ -14427,12 +14426,12 @@
 a.T8=y.T8
 y.T8=null}else{a.T8=y
 a.Bb=y.Bb
-y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,261,422]},
+y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,265,424]},
 Ba:{
-"":"vX;Cw,ac,aY,iW,J0,qT,bb",
+"":"vX;Cw,ac,aY,iW,P6,qT,bb",
 wS:function(a,b){return this.Cw.call$2(a,b)},
 Ef:function(a){return this.ac.call$1(a)},
-yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,423,424],
+yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,425,426],
 t:[function(a,b){if(b==null)throw H.b(new P.AT(b))
 if(this.Ef(b)!==!0)return
 if(this.aY!=null)if(J.de(this.vh(b),0))return this.aY.P
@@ -14449,22 +14448,22 @@
 return}y=new P.jp(c,b,null,null)
 y.$builtinTypeInfo=[null,null]
 this.K8(y,z)},"call$2","gj3",4,0,null,42,23],
-Ay:[function(a,b){J.kH(b,new P.bF(this))},"call$1","gDY",2,0,null,104],
+FV:[function(a,b){J.kH(b,new P.bF(this))},"call$1","gDY",2,0,null,104],
 gl0:function(a){return this.aY==null},
 gor:function(a){return this.aY!=null},
 aN:[function(a,b){var z,y,x
 z=H.Kp(this,0)
 y=H.VM(new P.HW(this,H.VM([],[P.qv]),this.qT,this.bb,null),[z])
 y.Qf(this,[P.qv,z])
-for(;y.G();){x=y.gl(y)
+for(;y.G();){x=y.gl()
 z=J.RE(x)
 b.call$2(z.gG3(x),z.gP(x))}},"call$1","gjw",2,0,null,110],
-gB:function(a){return this.J0},
+gB:function(a){return this.P6},
 V1:[function(a){this.aY=null
-this.J0=0
+this.P6=0
 this.qT=this.qT+1},"call$0","gyP",0,0,null],
 x4:[function(a){return this.Ef(a)===!0&&J.de(this.vh(a),0)},"call$1","gV9",2,0,null,42],
-PF:[function(a){return new P.LD(this,a,this.bb).call$1(this.aY)},"call$1","gmc",2,0,null,23],
+di:[function(a){return new P.LD(this,a,this.bb).call$1(this.aY)},"call$1","gmc",2,0,null,23],
 gvc:function(a){return H.VM(new P.OG(this),[H.Kp(this,0)])},
 gUQ:function(a){var z=new P.uM(this)
 z.$builtinTypeInfo=this.$builtinTypeInfo
@@ -14472,8 +14471,8 @@
 bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
 $isBa:true,
 $asvX:function(a,b){return[a]},
-$asL8:null,
-$isL8:true,
+$asZ0:null,
+$isZ0:true,
 static:{GV:function(a,b,c,d){var z,y
 z=P.n4()
 y=new P.An(c)
@@ -14481,7 +14480,7 @@
 An:{
 "":"Tp:229;a",
 call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,273,"call"],
+return z},"call$1",null,2,0,null,277,"call"],
 $isEH:true},
 bF:{
 "":"Tp;a",
@@ -14489,23 +14488,22 @@
 $isEH:true,
 $signature:function(){return H.IG(function(a,b){return{func:"ri",args:[a,b]}},this.a,"Ba")}},
 LD:{
-"":"Tp:425;a,b,c",
+"":"Tp:427;a,b,c",
 call$1:[function(a){var z,y,x,w
 for(z=this.c,y=this.a,x=this.b;a!=null;){if(J.de(a.P,x))return!0
 if(z!==y.bb)throw H.b(P.a4(y))
 w=a.T8
 if(w!=null&&this.call$1(w)===!0)return!0
-a=a.Bb}return!1},"call$1",null,2,0,null,261,"call"],
+a=a.Bb}return!1},"call$1",null,2,0,null,265,"call"],
 $isEH:true},
 S6B:{
 "":"a;",
-gl:function(a){var z=this.ya
+gl:function(){var z=this.ya
 if(z==null)return
 return this.Wb(z)},
-rF:function(a,b,c,d){return this.gl(a).call$3(b,c,d)},
 WV:[function(a){var z
 for(z=this.Ln;a!=null;){z.push(a)
-a=a.Bb}},"call$1","gih",2,0,null,261],
+a=a.Bb}},"call$1","gBl",2,0,null,265],
 G:[function(){var z,y,x
 z=this.Dn
 if(this.qT!==z.qT)throw H.b(P.a4(z))
@@ -14523,8 +14521,8 @@
 Qf:function(a,b){this.WV(a.aY)}},
 OG:{
 "":"mW;Dn",
-gB:function(a){return this.Dn.J0},
-gl0:function(a){return this.Dn.J0===0},
+gB:function(a){return this.Dn.P6},
+gl0:function(a){return this.Dn.P6===0},
 gA:function(a){var z,y
 z=this.Dn
 y=new P.DN(z,H.VM([],[P.qv]),z.qT,z.bb,null)
@@ -14534,8 +14532,8 @@
 $isyN:true},
 uM:{
 "":"mW;Fb",
-gB:function(a){return this.Fb.J0},
-gl0:function(a){return this.Fb.J0===0},
+gB:function(a){return this.Fb.P6},
+gl0:function(a){return this.Fb.P6===0},
 gA:function(a){var z,y
 z=this.Fb
 y=new P.ZM(z,H.VM([],[P.qv]),z.qT,z.bb,null)
@@ -14547,14 +14545,14 @@
 $isyN:true},
 DN:{
 "":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,261]},
+Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,265]},
 ZM:{
 "":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.P},"call$1","gBL",2,0,null,261],
+Wb:[function(a){return a.P},"call$1","gBL",2,0,null,265],
 $asS6B:function(a,b){return[b]}},
 HW:{
 "":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a},"call$1","gBL",2,0,null,261],
+Wb:[function(a){return a},"call$1","gBL",2,0,null,265],
 $asS6B:function(a){return[[P.qv,a]]}}}],["dart.convert","dart:convert",,P,{
 "":"",
 VQ:[function(a,b){var z=new P.JC()
@@ -14568,7 +14566,7 @@
 throw H.b(P.cD(String(y)))}return P.VQ(z,b)},"call$2","pi",4,0,null,27,186],
 tp:[function(a){return a.Lt()},"call$1","BC",2,0,187,6],
 JC:{
-"":"Tp:347;",
+"":"Tp:349;",
 call$2:[function(a,b){return b},"call$2",null,4,0,null,42,23,"call"],
 $isEH:true},
 f1:{
@@ -14629,8 +14627,8 @@
 throw H.b(P.ox(a,y))}}},"call$1","gO5",2,0,null,6],
 IS:[function(a){var z,y,x,w
 z={}
-if(typeof a==="number"){if(!C.le.gx8(a))return!1
-this.Mw.KF(C.le.bu(a))
+if(typeof a==="number"){if(!C.CD.gx8(a))return!1
+this.Mw.KF(C.CD.bu(a))
 return!0}else if(a===!0){this.Mw.KF("true")
 return!0}else if(a===!1){this.Mw.KF("false")
 return!0}else if(a==null){this.Mw.KF("null")
@@ -14642,7 +14640,7 @@
 if(typeof a==="object"&&a!==null&&(a.constructor===Array||!!y.$isList)){this.WD(a)
 z=this.Mw
 z.KF("[")
-if(J.xZ(y.gB(a),0)){this.rl(y.t(a,0))
+if(J.z8(y.gB(a),0)){this.rl(y.t(a,0))
 x=1
 while(!0){w=y.gB(a)
 if(typeof w!=="number")return H.s(w)
@@ -14650,7 +14648,7 @@
 z.vM=z.vM+","
 this.rl(y.t(a,x));++x}}z.KF("]")
 this.JN.Rz(0,a)
-return!0}else if(typeof a==="object"&&a!==null&&!!y.$isL8){this.WD(a)
+return!0}else if(typeof a==="object"&&a!==null&&!!y.$isZ0){this.WD(a)
 w=this.Mw
 w.KF("{")
 z.a=!0
@@ -14658,7 +14656,7 @@
 w.KF("}")
 this.JN.Rz(0,a)
 return!0}else return!1}},"call$1","gjQ",2,0,null,6],
-static:{"":"P3,kD,IE,Yz,ij,fg,SW,KQ,MU,ql,YM,PBv,QVv",Vg:[function(a,b){var z
+static:{"":"P3,kD,IE,Yz,ij,fg,SW,KQz,MU,ql,NXu,PBv,QVv",Vg:[function(a,b){var z
 b=P.BC()
 z=P.p9("")
 new P.Sh(b,z,P.yv(null)).rl(a)
@@ -14694,7 +14692,7 @@
 x.push(u)
 w=!0}else x.push(u)}a.KF(w?P.HM(x):b)},"call$2","qW",4,0,null,189,86]}},
 tF:{
-"":"Tp:426;a,b",
+"":"Tp:428;a,b",
 call$2:[function(a,b){var z,y,x
 z=this.a
 y=this.b
@@ -14754,7 +14752,7 @@
 this.ZP=y+1
 if(y>=v)return H.e(z,y)
 z[y]=128|a&63
-return!1}},"call$2","gkL",4,0,null,427,428],
+return!1}},"call$2","gkL",4,0,null,429,430],
 fJ:[function(a,b,c){var z,y,x,w,v,u,t,s
 if(b!==c&&(J.lE(a,J.xH(c,1))&64512)===55296)c=J.xH(c,1)
 if(typeof c!=="number")return H.s(c)
@@ -14787,7 +14785,7 @@
 z[s]=128|v>>>6&63
 this.ZP=u+1
 if(u>=y)return H.e(z,u)
-z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,338,115,116],
+z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,340,115,116],
 static:{"":"Ij"}},
 GY:{
 "":"wI;lH",
@@ -14796,22 +14794,22 @@
 y=new P.jZ(this.lH,z,!0,0,0,0)
 y.ME(a,0,J.q8(a))
 y.fZ()
-return z.vM},"call$1","gmC",2,0,null,429],
+return z.vM},"call$1","gmC",2,0,null,431],
 $aswI:function(){return[[J.Q,J.im],J.O]}},
 jZ:{
-"":"a;lH,aS,rU,nt,iU,VN",
+"":"a;lH,aS,rU,Ok,TY,VN",
 cO:[function(a){this.fZ()},"call$0","gJK",0,0,null],
-fZ:[function(){if(this.iU>0){if(this.lH!==!0)throw H.b(P.cD("Unfinished UTF-8 octet sequence"))
+fZ:[function(){if(this.TY>0){if(this.lH!==!0)throw H.b(P.cD("Unfinished UTF-8 octet sequence"))
 this.aS.KF(P.fc(65533))
-this.nt=0
-this.iU=0
+this.Ok=0
+this.TY=0
 this.VN=0}},"call$0","gRh",0,0,null],
 ME:[function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p
-z=this.nt
-y=this.iU
+z=this.Ok
+y=this.TY
 x=this.VN
-this.nt=0
-this.iU=0
+this.Ok=0
+this.TY=0
 this.VN=0
 $loop$0:for(w=this.aS,v=this.lH!==!0,u=J.U6(a),t=b;!0;t=p){$multibyte$2:{if(y>0){do{if(t===c)break $loop$0
 s=u.t(a,t)
@@ -14834,7 +14832,7 @@
 w.vM=w.vM+r}this.rU=!1}}for(;t<c;t=p){p=t+1
 s=u.t(a,t)
 r=J.Wx(s)
-if(r.C(s,0)){if(v)throw H.b(P.cD("Negative UTF-8 code unit: -0x"+C.le.WZ(r.J(s),16)))
+if(r.C(s,0)){if(v)throw H.b(P.cD("Negative UTF-8 code unit: -0x"+C.CD.WZ(r.J(s),16)))
 q=P.O8(1,65533,J.im)
 r=H.eT(q)
 w.vM=w.vM+r}else if(r.E(s,127)){this.rU=!1
@@ -14856,12 +14854,12 @@
 w.vM=w.vM+r
 z=65533
 y=0
-x=0}}break $loop$0}if(y>0){this.nt=z
-this.iU=y
-this.VN=x}},"call$3","gmC",6,0,null,429,80,125],
+x=0}}break $loop$0}if(y>0){this.Ok=z
+this.TY=y
+this.VN=x}},"call$3","gmC",6,0,null,431,80,125],
 static:{"":"PO"}}}],["dart.core","dart:core",,P,{
 "":"",
-Te:[function(a){return},"call$1","J6",2,0,null,44],
+Te:[function(a){return},"call$1","PM",2,0,null,44],
 Wc:[function(a,b){return J.oE(a,b)},"call$2","n4",4,0,190,123,180],
 hl:[function(a){var z,y,x,w,v,u
 if(typeof a==="number"||typeof a==="boolean"||null==a)return J.AG(a)
@@ -14897,7 +14895,7 @@
 return z},
 F:function(a,b,c){var z,y,x,w,v,u,t
 z=H.VM([],[c])
-for(y=J.GP(a);y.G();)z.push(y.gl(y))
+for(y=J.GP(a);y.G();)z.push(y.gl())
 if(b)return z
 x=z.length
 y=Array(x)
@@ -14915,11 +14913,11 @@
 HM:function(a){return H.eT(a)},
 fc:function(a){return P.HM(P.O8(1,a,J.im))},
 HB:{
-"":"Tp:347;a",
+"":"Tp:349;a",
 call$2:[function(a,b){this.a.u(0,a.gfN(a),b)},"call$2",null,4,0,null,129,23,"call"],
 $isEH:true},
 CL:{
-"":"Tp:382;a",
+"":"Tp:384;a",
 call$2:[function(a,b){var z=this.a
 if(z.b>0)z.a.KF(", ")
 z.a.KF(J.GL(a))
@@ -14943,27 +14941,27 @@
 z=J.x(b)
 if(typeof b!=="object"||b===null||!z.$isiP)return!1
 return this.y3===b.y3&&this.aL===b.aL},"call$1","gUJ",2,0,null,104],
-iM:[function(a,b){return C.le.iM(this.y3,b.gy3())},"call$1","gYc",2,0,null,104],
+iM:[function(a,b){return C.CD.iM(this.y3,b.gy3())},"call$1","gYc",2,0,null,104],
 giO:function(a){return this.y3},
 bu:[function(a){var z,y,x,w,v,u,t,s,r,q
-z=new P.pl()
+z=n