glass-easel 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/.eslintignore +4 -0
  2. package/dist/glass_easel.all.js +2 -2
  3. package/dist/glass_easel.all.js.map +1 -1
  4. package/dist/glass_easel.d.ts +2546 -0
  5. package/dist/glass_easel.domlike.global.js +2 -2
  6. package/dist/glass_easel.domlike.global.js.map +1 -1
  7. package/guide/zh_CN/appendix/backend_protocol.md +164 -74
  8. package/jest.unit.config.js +7 -4
  9. package/package.json +7 -5
  10. package/rollup.config.ts +101 -0
  11. package/src/backend/backend_protocol.ts +26 -345
  12. package/src/backend/composed_backend_protocol.ts +10 -264
  13. package/src/backend/current_window_backend_context.ts +478 -0
  14. package/src/backend/domlike_backend_protocol.ts +9 -498
  15. package/src/backend/empty_backend.ts +265 -0
  16. package/src/backend/empty_composed_backend.ts +245 -0
  17. package/src/backend/index.ts +18 -0
  18. package/src/backend/suggested_backend_protocol.ts +62 -11
  19. package/src/behavior.ts +131 -442
  20. package/src/class_list.ts +328 -222
  21. package/src/component.ts +349 -184
  22. package/src/component_params.ts +54 -25
  23. package/src/component_space.ts +36 -15
  24. package/src/data_path.ts +22 -34
  25. package/src/data_proxy.ts +334 -27
  26. package/src/devtool.ts +89 -0
  27. package/src/element.ts +667 -285
  28. package/src/element_iterator.ts +9 -4
  29. package/src/event.ts +39 -20
  30. package/src/external_shadow_tree.ts +2 -2
  31. package/src/func_arr.ts +55 -101
  32. package/src/global_options.ts +18 -42
  33. package/src/index.ts +72 -73
  34. package/src/mutation_observer.ts +10 -7
  35. package/src/native_node.ts +79 -35
  36. package/src/node.ts +23 -30
  37. package/src/relation.ts +101 -12
  38. package/src/render.ts +5 -3
  39. package/src/selector.ts +9 -7
  40. package/src/shadow_root.ts +96 -240
  41. package/src/template_engine.ts +10 -7
  42. package/src/text_node.ts +43 -19
  43. package/src/tmpl/index.ts +38 -30
  44. package/src/tmpl/native_rendering.ts +14 -21
  45. package/src/tmpl/proc_gen_wrapper.ts +189 -151
  46. package/src/tmpl/proc_gen_wrapper_dom.ts +10 -8
  47. package/src/tmpl/range_list_diff.ts +30 -9
  48. package/src/trait_behaviors.ts +1 -1
  49. package/src/type_symbol.ts +36 -0
  50. package/src/virtual_node.ts +26 -13
  51. package/src/warning.ts +119 -0
  52. package/tests/base/composed_backend.ts +143 -142
  53. package/tests/base/env.ts +76 -3
  54. package/tests/base/match.ts +24 -22
  55. package/tests/base/shadow_backend.ts +917 -0
  56. package/tests/core/backend.test.ts +53 -1
  57. package/tests/core/behavior.test.ts +1 -1
  58. package/tests/core/data_update.test.ts +135 -0
  59. package/tests/core/misc.test.ts +91 -21
  60. package/tests/core/placeholder.test.ts +66 -25
  61. package/tests/core/slot.test.ts +161 -23
  62. package/tests/legacy/component.test.js +152 -78
  63. package/tests/legacy/data_path.test.js +19 -19
  64. package/tests/legacy/data_proxy.test.js +14 -7
  65. package/tests/legacy/external.test.js +8 -8
  66. package/tests/legacy/mutation_observer.test.js +7 -5
  67. package/tests/legacy/slot.test.js +2 -3
  68. package/tests/legacy/virtual.test.js +258 -25
  69. package/tests/tmpl/binding_map.test.ts +201 -195
  70. package/tests/tmpl/event.test.ts +138 -23
  71. package/tests/tmpl/expression.test.ts +15 -15
  72. package/tests/tmpl/lvalue.test.ts +101 -0
  73. package/tests/tmpl/structure.test.ts +486 -43
  74. package/tests/types/chaining.test.ts +27 -30
  75. package/tests/types/createElement.test.ts +5 -4
  76. package/tests/types/definition.test.ts +11 -14
  77. package/tsconfig.json +1 -3
  78. package/dist/glass_easel.all.d.ts +0 -1
  79. package/dist/glass_easel.domlike.global.d.ts +0 -1
  80. package/dist/index.d.ts +0 -1
  81. package/dist/index.js +0 -1
  82. package/dist/types/src/backend/backend_protocol.d.ts +0 -141
  83. package/dist/types/src/backend/backend_protocol.d.ts.map +0 -1
  84. package/dist/types/src/backend/composed_backend_protocol.d.ts +0 -102
  85. package/dist/types/src/backend/composed_backend_protocol.d.ts.map +0 -1
  86. package/dist/types/src/backend/domlike_backend_protocol.d.ts +0 -100
  87. package/dist/types/src/backend/domlike_backend_protocol.d.ts.map +0 -1
  88. package/dist/types/src/backend/mode.d.ts +0 -65
  89. package/dist/types/src/backend/mode.d.ts.map +0 -1
  90. package/dist/types/src/backend/suggested_backend_protocol.d.ts +0 -30
  91. package/dist/types/src/backend/suggested_backend_protocol.d.ts.map +0 -1
  92. package/dist/types/src/behavior.d.ts +0 -434
  93. package/dist/types/src/behavior.d.ts.map +0 -1
  94. package/dist/types/src/class_list.d.ts +0 -83
  95. package/dist/types/src/class_list.d.ts.map +0 -1
  96. package/dist/types/src/component.d.ts +0 -325
  97. package/dist/types/src/component.d.ts.map +0 -1
  98. package/dist/types/src/component_params.d.ts +0 -236
  99. package/dist/types/src/component_params.d.ts.map +0 -1
  100. package/dist/types/src/component_space.d.ts +0 -211
  101. package/dist/types/src/component_space.d.ts.map +0 -1
  102. package/dist/types/src/data_path.d.ts +0 -5
  103. package/dist/types/src/data_path.d.ts.map +0 -1
  104. package/dist/types/src/data_proxy.d.ts +0 -107
  105. package/dist/types/src/data_proxy.d.ts.map +0 -1
  106. package/dist/types/src/data_utils.d.ts +0 -3
  107. package/dist/types/src/data_utils.d.ts.map +0 -1
  108. package/dist/types/src/element.d.ts +0 -365
  109. package/dist/types/src/element.d.ts.map +0 -1
  110. package/dist/types/src/element_iterator.d.ts +0 -43
  111. package/dist/types/src/element_iterator.d.ts.map +0 -1
  112. package/dist/types/src/event.d.ts +0 -105
  113. package/dist/types/src/event.d.ts.map +0 -1
  114. package/dist/types/src/external_shadow_tree.d.ts +0 -20
  115. package/dist/types/src/external_shadow_tree.d.ts.map +0 -1
  116. package/dist/types/src/func_arr.d.ts +0 -39
  117. package/dist/types/src/func_arr.d.ts.map +0 -1
  118. package/dist/types/src/global_options.d.ts +0 -120
  119. package/dist/types/src/global_options.d.ts.map +0 -1
  120. package/dist/types/src/index.d.ts +0 -43
  121. package/dist/types/src/index.d.ts.map +0 -1
  122. package/dist/types/src/mutation_observer.d.ts +0 -79
  123. package/dist/types/src/mutation_observer.d.ts.map +0 -1
  124. package/dist/types/src/native_node.d.ts +0 -11
  125. package/dist/types/src/native_node.d.ts.map +0 -1
  126. package/dist/types/src/node.d.ts +0 -48
  127. package/dist/types/src/node.d.ts.map +0 -1
  128. package/dist/types/src/relation.d.ts +0 -46
  129. package/dist/types/src/relation.d.ts.map +0 -1
  130. package/dist/types/src/render.d.ts +0 -3
  131. package/dist/types/src/render.d.ts.map +0 -1
  132. package/dist/types/src/selector.d.ts +0 -32
  133. package/dist/types/src/selector.d.ts.map +0 -1
  134. package/dist/types/src/shadow_root.d.ts +0 -174
  135. package/dist/types/src/shadow_root.d.ts.map +0 -1
  136. package/dist/types/src/template_engine.d.ts +0 -56
  137. package/dist/types/src/template_engine.d.ts.map +0 -1
  138. package/dist/types/src/text_node.d.ts +0 -44
  139. package/dist/types/src/text_node.d.ts.map +0 -1
  140. package/dist/types/src/tmpl/index.d.ts +0 -19
  141. package/dist/types/src/tmpl/index.d.ts.map +0 -1
  142. package/dist/types/src/tmpl/native_rendering.d.ts +0 -45
  143. package/dist/types/src/tmpl/native_rendering.d.ts.map +0 -1
  144. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts +0 -89
  145. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts.map +0 -1
  146. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts +0 -50
  147. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts.map +0 -1
  148. package/dist/types/src/tmpl/range_list_diff.d.ts +0 -19
  149. package/dist/types/src/tmpl/range_list_diff.d.ts.map +0 -1
  150. package/dist/types/src/trait_behaviors.d.ts +0 -38
  151. package/dist/types/src/trait_behaviors.d.ts.map +0 -1
  152. package/dist/types/src/virtual_node.d.ts +0 -10
  153. package/dist/types/src/virtual_node.d.ts.map +0 -1
  154. package/dist/types/tests/backend/domlike.test.d.ts +0 -2
  155. package/dist/types/tests/backend/domlike.test.d.ts.map +0 -1
  156. package/dist/types/tests/base/composed_backend.d.ts +0 -123
  157. package/dist/types/tests/base/composed_backend.d.ts.map +0 -1
  158. package/dist/types/tests/base/env.d.ts +0 -30
  159. package/dist/types/tests/base/env.d.ts.map +0 -1
  160. package/dist/types/tests/base/match.d.ts +0 -9
  161. package/dist/types/tests/base/match.d.ts.map +0 -1
  162. package/dist/types/tests/core/backend.test.d.ts +0 -2
  163. package/dist/types/tests/core/backend.test.d.ts.map +0 -1
  164. package/dist/types/tests/core/behavior.test.d.ts +0 -2
  165. package/dist/types/tests/core/behavior.test.d.ts.map +0 -1
  166. package/dist/types/tests/core/component_space.test.d.ts +0 -2
  167. package/dist/types/tests/core/component_space.test.d.ts.map +0 -1
  168. package/dist/types/tests/core/data_update.test.d.ts +0 -2
  169. package/dist/types/tests/core/data_update.test.d.ts.map +0 -1
  170. package/dist/types/tests/core/misc.test.d.ts +0 -2
  171. package/dist/types/tests/core/misc.test.d.ts.map +0 -1
  172. package/dist/types/tests/core/placeholder.test.d.ts +0 -2
  173. package/dist/types/tests/core/placeholder.test.d.ts.map +0 -1
  174. package/dist/types/tests/core/slot.test.d.ts +0 -2
  175. package/dist/types/tests/core/slot.test.d.ts.map +0 -1
  176. package/dist/types/tests/core/trait_behaviors.test.d.ts +0 -2
  177. package/dist/types/tests/core/trait_behaviors.test.d.ts.map +0 -1
  178. package/dist/types/tests/tmpl/binding_map.test.d.ts +0 -2
  179. package/dist/types/tests/tmpl/binding_map.test.d.ts.map +0 -1
  180. package/dist/types/tests/tmpl/event.test.d.ts +0 -2
  181. package/dist/types/tests/tmpl/event.test.d.ts.map +0 -1
  182. package/dist/types/tests/tmpl/expression.test.d.ts +0 -2
  183. package/dist/types/tests/tmpl/expression.test.d.ts.map +0 -1
  184. package/dist/types/tests/tmpl/lvalue.test.d.ts +0 -2
  185. package/dist/types/tests/tmpl/lvalue.test.d.ts.map +0 -1
  186. package/dist/types/tests/tmpl/native_rendering.test.d.ts +0 -2
  187. package/dist/types/tests/tmpl/native_rendering.test.d.ts.map +0 -1
  188. package/dist/types/tests/tmpl/structure.test.d.ts +0 -2
  189. package/dist/types/tests/tmpl/structure.test.d.ts.map +0 -1
  190. package/dist/types/tests/types/chaining.test.d.ts +0 -2
  191. package/dist/types/tests/types/chaining.test.d.ts.map +0 -1
  192. package/dist/types/tests/types/createElement.test.d.ts +0 -2
  193. package/dist/types/tests/types/createElement.test.d.ts.map +0 -1
  194. package/dist/types/tests/types/definition.test.d.ts +0 -2
  195. package/dist/types/tests/types/definition.test.d.ts.map +0 -1
  196. package/webpack.config.js +0 -275
  197. /package/src/backend/{mode.ts → shared.ts} +0 -0
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{BackendMode:()=>u,Behavior:()=>ke,BehaviorBuilder:()=>Ne,ClassList:()=>E,Component:()=>$e,ComponentDefinition:()=>ge,ComponentSpace:()=>Me,DataGroup:()=>H,DeepCopyKind:()=>qe,Element:()=>re,ElementIterator:()=>Nt,ElementIteratorType:()=>yt,Event:()=>Q,EventBubbleStatus:()=>P,EventMutLevel:()=>z,FuncArr:()=>ot,MutationObserver:()=>vt,NativeNode:()=>$t,NormalizedPropertyType:()=>le,Observer:()=>vt,ParsedSelector:()=>te,RelationType:()=>oe,ShadowRoot:()=>St,StyleScopeManager:()=>w,StyleSegmentIndex:()=>J,TextNode:()=>gt,TraitBehavior:()=>ue,VirtualNode:()=>se,addGlobalErrorListener:()=>ut,addGlobalWarningListener:()=>pt,backend:()=>n,composedBackend:()=>o,createElement:()=>At,dataPath:()=>i,dataUtils:()=>a,domlikeBackend:()=>r,dumpElement:()=>Et,dumpElementToString:()=>wt,dumpSingleElementToString:()=>Ct,getDefaultComponentSpace:()=>Qe,glassEaselTemplate:()=>l,globalOptions:()=>tt,mutationObserver:()=>c,registerBehavior:()=>Ot,registerElement:()=>xt,removeGlobalErrorListener:()=>dt,removeGlobalWarningListener:()=>ht,safeCallback:()=>ct,template:()=>l,templateEngine:()=>d,triggerEvent:()=>Mt,triggerExternalEvent:()=>Lt,triggerRender:()=>kt,typeUtils:()=>s});var n={};e.r(n),e.d(n,{BackendMode:()=>u,EmptyBackendContext:()=>g,EmptyBackendElement:()=>_,EmptyBackendElementType:()=>h,EmptyBackendShadowRootContext:()=>$});var o={};e.r(o),e.d(o,{EmptyComposedBackendContext:()=>m,EmptyComposedBackendElement:()=>y});var r={};e.r(r),e.d(r,{CurrentWindowBackendContext:()=>S});var i={};e.r(i),e.d(i,{parseMultiPaths:()=>L,parseSinglePath:()=>M});var a={};e.r(a),e.d(a,{deepCopy:()=>I,simpleDeepCopy:()=>T});var s={};e.r(s),e.d(s,{METHOD_TAG:()=>ie});var l={};e.r(l),e.d(l,{DEFAULT_PROC_GEN_GROUP:()=>ze,GlassEaselTemplateEngine:()=>Xe});var c={};e.r(c),e.d(c,{MutationObserver:()=>vt,MutationObserverTarget:()=>ft});var u,d={};e.r(d),function(e){e[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike"}(u||(u={}));var p,h,f=(p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},p(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){e[e.Fragment=0]="Fragment",e[e.Element=1]="Element",e[e.TextNode=2]="TextNode",e[e.Component=3]="Component",e[e.VirtualNode=4]="VirtualNode"}(h||(h={}));var v,g=function(){function e(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new $}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return 1},e.prototype.getWindowHeight=function(){return 1},e.prototype.getDevicePixelRatio=function(){return 1},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},e.prototype.disableStyleSheet=function(e){},e.prototype.render=function(e){var t=this;if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{var n=this._$renderCallbacks=[e];setTimeout((function(){t._$renderCallbacks=null,n.forEach((function(e){ct("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$shadowRoot},e.prototype.createFragment=function(){return new _(0)},e.prototype.onEvent=function(e){},e.prototype.createMediaQueryObserver=function(e,t){return{disconnect:function(){}}},e}(),_=function(){function e(e){this._$shadowRoot=3===e?new $:null}return e.prototype.release=function(){},e.prototype.associateValue=function(e){},e.prototype.getShadowRoot=function(){return this._$shadowRoot||void 0},e.prototype.appendChild=function(e){},e.prototype.removeChild=function(e,t){},e.prototype.insertBefore=function(e,t,n){},e.prototype.replaceChild=function(e,t,n){},e.prototype.spliceBefore=function(e,t,n){},e.prototype.spliceAppend=function(e){},e.prototype.spliceRemove=function(e,t){},e.prototype.setId=function(e){},e.prototype.setSlotName=function(e){},e.prototype.setContainingSlot=function(e){},e.prototype.reassignContainingSlot=function(e,t){},e.prototype.spliceBeforeSlotNodes=function(e,t,n){},e.prototype.spliceRemoveSlotNodes=function(e,t){},e.prototype.spliceAppendSlotNodes=function(e){},e.prototype.setInheritSlots=function(){},e.prototype.setVirtualHost=function(){},e.prototype.setStyleScope=function(e){},e.prototype.setStyle=function(e){},e.prototype.addClass=function(e,t){},e.prototype.removeClass=function(e,t){},e.prototype.clearClasses=function(){},e.prototype.setAttribute=function(e,t){},e.prototype.removeAttribute=function(e){},e.prototype.setDataset=function(e,t){},e.prototype.setText=function(e){},e.prototype.getBoundingClientRect=function(e){setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.setListenerStats=function(e,t,n){},e.prototype.setModelBindingStat=function(e,t){},e.prototype.createIntersectionObserver=function(e,t,n,o){return{disconnect:function(){}}},e.prototype.getContext=function(e){e(null)},e}(),$=function(e){function t(){return e.call(this,4)||this}return f(t,e),t.prototype.createElement=function(e,t){return new _(1)},t.prototype.createTextNode=function(e){return new _(2)},t.prototype.createComponent=function(e){return new _(3)},t.prototype.createVirtualNode=function(e){return new _(4)},t}(_),m=function(){function e(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new y}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return 1},e.prototype.getWindowHeight=function(){return 1},e.prototype.getDevicePixelRatio=function(){return 1},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},e.prototype.disableStyleSheet=function(e){},e.prototype.render=function(e){var t=this;if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{var n=this._$renderCallbacks=[e];setTimeout((function(){t._$renderCallbacks=null,n.forEach((function(e){ct("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$rootNode},e.prototype.createElement=function(e,t){return new y},e.prototype.createTextNode=function(e){return new y},e.prototype.createFragment=function(){return new y},e.prototype.onEvent=function(e){},e.prototype.createMediaQueryObserver=function(e,t){return{disconnect:function(){}}},e}(),y=function(){function e(){}return e.prototype.release=function(){},e.prototype.associateValue=function(e){},e.prototype.appendChild=function(e){},e.prototype.removeChild=function(e,t){},e.prototype.insertBefore=function(e,t,n){},e.prototype.replaceChild=function(e,t,n){},e.prototype.spliceBefore=function(e,t,n){},e.prototype.spliceAppend=function(e){},e.prototype.spliceRemove=function(e,t){},e.prototype.setId=function(e){},e.prototype.setStyleScope=function(e){},e.prototype.setStyle=function(e){},e.prototype.addClass=function(e,t){},e.prototype.removeClass=function(e,t){},e.prototype.clearClasses=function(){},e.prototype.setAttribute=function(e,t){},e.prototype.removeAttribute=function(e){},e.prototype.setText=function(e){},e.prototype.getBoundingClientRect=function(e){setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.setListenerStats=function(e,t,n){},e.prototype.setModelBindingStat=function(e,t){},e.prototype.createIntersectionObserver=function(e,t,n,o){return{disconnect:function(){}}},e.prototype.getContext=function(e){e(null)},e}(),b=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"],S=function(){function e(){this.mode=3,this.document=document,this._$styleSheets=[],this._$styleSheetRegistry=Object.create(null),this._$delegatedEventListeners=Object.create(null),this._$elementEventListeners=new WeakMap,this._$elementCaptureEventListeners=new WeakMap,this._$triggedEvents=new WeakSet}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return document.documentElement.clientWidth},e.prototype.getWindowHeight=function(){return document.documentElement.clientHeight},e.prototype.getDevicePixelRatio=function(){return window.devicePixelRatio},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){this._$styleSheetRegistry[e]=String(t)},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetRegistry[e];if(void 0===n)throw new Error('No style sheet registry "'.concat(e,'"'));var o=document.createElement("style");o.innerText=n,void 0!==t&&o.setAttribute("wx-style-scope",String(t)),document.head.appendChild(o);var r=this._$styleSheets.length;return this._$styleSheets.push(o),r},e.prototype.disableStyleSheet=function(e){var t=this._$styleSheets[e];t&&document.head.removeChild(t)},e.prototype.render=function(e){var t=this;window.requestAnimationFrame((function(){ct("Render Callback",e,t,[null])}))},e.prototype.getRootNode=function(){return document.body},e.prototype.associateValue=function(e,t){e.__wxElement=t},e.prototype.onEvent=function(e){this._$eventListener||this._$initEvent(),this._$eventListener=e},e.prototype._$getEventDetail=function(e){for(var t={},n=e;Object.getPrototypeOf(n)!==Event.prototype;){for(var o=Object.keys(n),r=0;r<o.length;r+=1){var i=o[r];"function"!=typeof e[i]&&(t[i]=e[i])}n=Object.getPrototypeOf(n)}return t},e.prototype._$trigger=function(e,t,n,o,r){if(this._$eventListener&&e.target){for(var i=e.target;i&&!i.__wxElement;)i=i.parentNode;i&&1===this._$eventListener(i.__wxElement,t,n,{originalEvent:e,bubbles:o,composed:r,capturePhase:!0})&&e.preventDefault()}},e.prototype._$initEvent=function(){var e=this,t=Object.create(null),n=!1,o=function(e,n){t[n.identifier]={x:n.clientX,y:n.clientY}},r=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];(Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10)&&(delete t[r],e._$trigger(n,"canceltap",i,!0,!0))}},i=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10?e._$trigger(n,"canceltap",i,!0,!0):e._$trigger(n,"tap",i,!0,!0)}},a=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],e._$trigger(n,"canceltap",i,!0,!0)}};document.body.addEventListener("touchstart",(function(t){e._$trigger(t,"touchstart",e._$getEventDetail(t),t.bubbles,t.composed),n=!0;for(var r=t.changedTouches,i=0;i<r.length;i+=1)o(0,r[i])}),{capture:!0}),document.body.addEventListener("touchmove",(function(t){e._$trigger(t,"touchmove",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)r(t,n[o])}),{capture:!0}),document.body.addEventListener("touchend",(function(t){e._$trigger(t,"touchend",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)i(t,n[o])}),{capture:!0}),document.body.addEventListener("touchcancel",(function(t){e._$trigger(t,"touchcancel",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)a(t,n[o])}),{capture:!0}),document.body.addEventListener("mousedown",(function(t){e._$trigger(t,"mousedown",e._$getEventDetail(t),t.bubbles,t.composed),n||o(0,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0}),document.body.addEventListener("mousemove",(function(t){e._$trigger(t,"mousemove",e._$getEventDetail(t),t.bubbles,t.composed),n||r(t,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0}),document.body.addEventListener("mouseup",(function(t){e._$trigger(t,"mouseup",e._$getEventDetail(t),t.bubbles,t.composed),n||i(t,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0});var s=this._$delegatedEventListeners;s.touchstart=!0,s.touchmove=!0,s.touchend=!0,s.mousedown=!0,s.mousemove=!0,s.mouseup=!0},e.prototype.setListenerStats=function(e,t,n,o){var r=this;if(e){var i=b.includes(t),a=2===o;if(i){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(function(e){a&&e.preventDefault(),r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}var s=n?this._$elementCaptureEventListeners:this._$elementEventListeners;s.has(e)||s.set(e,Object.create(null));var l=s.get(e);l[t]||(l[t]=!0,e.addEventListener(t,(function(e){r._$triggedEvents.has(e)||(r._$triggedEvents.add(e),a&&e.preventDefault(),r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed))})))}},e.prototype.setModelBindingStat=function(e,t,n){var o=function(o,r){if(e._$wxArgs||(e._$wxArgs={modelListeners:Object.create(null)}),void 0===e._$wxArgs.modelListeners[t]){if(!n)return;e._$wxArgs.modelListeners[t]=n,e.addEventListener(o,(function(){var n,o=null===(n=e._$wxArgs)||void 0===n?void 0:n.modelListeners[t];null==o||o(r())}))}e._$wxArgs.modelListeners[t]=n},r=e.tagName,i=!1;if("INPUT"===r){var a=e,s=a.type;"checkbox"===s||"radio"===s?"checked"===t&&(i=!0,o("change",(function(){return a.checked}))):"value"===t&&(i=!0,o("input",(function(){return a.value})))}else if("TEXTAREA"===r){var l=e;"value"===t&&(i=!0,o("input",(function(){return l.value})))}else if("SELECT"===r){var c=e;"value"===t&&(i=!0,o("change",(function(){return c.value})))}i||rt('unsupported model binding on "'.concat(t,'" of "').concat(r.toLowerCase(),'" element.'))},e.prototype.createIntersectionObserver=function(e,t,n,o,r){var i=new IntersectionObserver((function(e){e.forEach((function(e){r({intersectionRatio:e.intersectionRatio,boundingClientRect:e.boundingClientRect,intersectionRect:e.intersectionRect,relativeRect:e.rootBounds,time:e.time})}))}),{root:t,rootMargin:n,threshold:o});return i.observe(e),{disconnect:function(){i.disconnect()}}},e.prototype.createMediaQueryObserver=function(e,t){var n=null,o=function(){var o,r,i=(o=document.documentElement.clientWidth,r=document.documentElement.clientHeight,!(void 0!==e.width&&o!==e.width||void 0!==e.maxWidth&&o>e.maxWidth||void 0!==e.minWidth&&o<e.minWidth||void 0!==e.width&&r!==e.height||void 0!==e.maxHeight&&r>e.maxHeight||void 0!==e.minHeight&&r<e.minHeight||(o>r?"landscape":"portrait")!==e.orientation));n!==i&&(n=i,t({matches:i}))};return setTimeout(o,0),window.addEventListener("resize",o),{disconnect:function(){window.removeEventListener("resize",o)}}},e.prototype.getContext=function(e,t){t(null)},e}(),C=/(~|\^+)?-?[_0-9a-z][-_0-9a-z]*/gi,w=function(){function e(){this._$names=[""]}return e.globalScope=function(){return 0},e.prototype.register=function(e){var t=this._$names.length;return this._$names.push(e),t},e.prototype.queryName=function(e){return this._$names[e]},e}(),E=function(){function e(e,t){var n,o,r;this._$aliasDirty=!1,this._$rawNames=[],this._$rawNamesSegmentSep=[],this._$hasResolvedNames=!1,this._$elem=e;var i=null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getHostNode();if(i){var a=i.getComponentOptions();this._$owner=i.classList,this._$defaultScope=a.styleScope,this._$extraScope=null===a.extraStyleScope?void 0:a.extraStyleScope,this._$rootScope=null!==(o=i.classList._$rootScope)&&void 0!==o?o:this._$defaultScope}else this._$owner=null,this._$defaultScope=w.globalScope(),this._$extraScope=void 0,this._$rootScope=void 0;if(this._$alias=t,t){var s=Object.create(null);Object.keys(t).forEach((function(e){s[e]=null})),this._$resolvedAlias=s}else this._$resolvedAlias=null;3===e.getBackendMode()&&(this._$prefixManager=null===(r=e.ownerShadowRoot)||void 0===r?void 0:r.getHostNode().getRootBehavior().ownerSpace.styleScopeManager)}return e.prototype._$resolvePrefixes=function(e,t){var n,o=null===(n=this._$owner)||void 0===n?void 0:n._$resolvedAlias;if(o&&void 0!==o[e]){var r=o[e];if(this._$hasResolvedNames=!0,r)for(var i=0;i<r.length;i+=1){var a=r[i];t(a.scopeId,a.className)}}else if("~"===e[0])t(this._$rootScope,e.slice(1));else if("^"===e[0]){for(var s=e.slice(1),l=this._$owner;l&&"^"===s[0];)s=s.slice(1),l=l._$owner;t(l?l._$defaultScope:this._$rootScope,s)}else void 0!==this._$extraScope&&t(this._$extraScope,e),t(this._$defaultScope,e)},e.prototype._$updateResolvedAliases=function(e){var t=this,n=this._$alias[e],o=[];n&&n.forEach((function(e){t._$resolvePrefixes(e,(function(e,t){o.push({scopeId:e,className:t})}))}));var r=!1,i=this._$resolvedAlias[e];if(i)if(i.length!==o.length)r=!0;else for(var a=0;a<i.length;a+=1){var s=i[a],l=o[a];if(s.scopeId!==l.scopeId||s.className!==l.className){r=!0;break}}else o.length>0&&(r=!0);return this._$resolvedAlias[e]=o,r},e.prototype._$hasAlias=function(e){return!(!this._$alias||void 0===this._$alias[e])},e.prototype._$setAlias=function(e,t){if(this._$alias){var n=String(t).match(C)||null;this._$alias[e]=n,this._$updateResolvedAliases(e)&&(this._$aliasDirty=!0)}},e.prototype._$spreadAliasUpdate=function(){if(this._$aliasDirty){this._$aliasDirty=!1;var e=function(t){var n=t.classList;if(n){var o=n._$alias;if(o){var r=!1;if(Object.keys(o).forEach((function(e){n._$updateResolvedAliases(e)&&(r=!0)})),r){var i=t;!1===i._$external&&e(i.shadowRoot)}}n._$hasResolvedNames&&n._$updateResolvedNames()}t.childNodes.forEach((function(t){t instanceof re&&e(t)}))},t=this._$elem;!1===t._$external&&e(t.shadowRoot)}},e.prototype._$updateResolvedNames=function(){var e=this,t=this._$elem.getBackendElement();t&&(this._$hasResolvedNames=!1,3===this._$elem.getBackendMode()?t.setAttribute("class",""):t.clearClasses(),this._$rawNames.forEach((function(n){e._$addClassToBackend(n,t)})))},e.prototype._$classListAdd=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=void 0===t?"":null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t),i=r?"".concat(r,"--").concat(e):e;n.classList.add(i)}else n.addClass(e,t)},e.prototype._$classListRemove=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=t&&(null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t)),i=r?"".concat(r,"--").concat(e):e;n.classList.remove(i)}else n.removeClass(e,t)},e.prototype._$addClassToBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListAdd(o,e,t)}))},e.prototype._$removeClassFromBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListRemove(o,e,t)}))},e.prototype.toggle=function(e,t){var n=this,o=String(e).match(C)||null;if(o){var r=this._$elem.getBackendElement();o.forEach((function(o){var i=n._$rawNames.indexOf(e),a=!1;if((void 0===t?i<0:t)?i<0&&(n._$rawNames.push(o),r&&n._$addClassToBackend(o,r),a=!0):i>=0&&(n._$rawNames.splice(i,1),r&&n._$removeClassFromBackend(o,r),a=!0),a){var s=n._$elem;s._$mutationObserverTarget&&ft.callAttrObservers(s,{type:"properties",target:s,attributeName:"class"})}}))}},e.prototype.contains=function(e){for(var t=0;t<this._$rawNames.length;t+=1){var n=this._$rawNames[t];if("~"===n[0]){if((o=n.slice(1))===e)return!0}else if("^"===n[0]){for(var o=n.slice(1);"^"===o[0];)o=o.slice(1);if(o===e)return!0}else if(n===e)return!0}return!1},e.prototype.setClassNames=function(e,t){var n;void 0===t&&(t=0);for(var o=(null==e?"":String(e)).match(C)||[];this._$rawNamesSegmentSep.length<t;)this._$rawNamesSegmentSep.push(this._$rawNamesSegmentSep.length>0?this._$rawNamesSegmentSep[this._$rawNamesSegmentSep.length-1]:this._$rawNames.length);if(0===this._$rawNamesSegmentSep.length)this._$rawNames=o;else{for(var r=t<this._$rawNamesSegmentSep.length?this._$rawNamesSegmentSep[t]:this._$rawNames.length,i=t>0?this._$rawNamesSegmentSep[t-1]:0,a=r-i,s=o.length-a,l=t;l<this._$rawNamesSegmentSep.length;l+=1)this._$rawNamesSegmentSep[l]+=s;(n=this._$rawNames).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}([i,a],o,!1))}this._$updateResolvedNames();var c=this._$elem;c._$mutationObserverTarget&&ft.callAttrObservers(c,{type:"properties",target:c,attributeName:"class"})},e.prototype.getClassNames=function(){return this._$rawNames?this._$rawNames.join(" "):""},e}(),N=function(e){for(var t=e.str;e.cur<t.length;){var n=t[e.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;e.cur+=1}return e.cur<t.length},k=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if(!(o>="0"&&o<="9"))break;n+=o,e.cur+=1}if(!n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));return parseInt(n,10)},O=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if("\\"===o)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(o))n+=o;else{if(!(o>="0"&&o<="9"))break;if(""===n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name cannot start with digits)"));n+=o}e.cur+=1}return n},x=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if("\\"===o)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{var r=t[e.cur+1];"."===r||"["===r||"]"===r||"\\"===r?(n+=r,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===o||"["===o)break;n+=o,e.cur+=1}}return n},A=function(e){var t=e.str;if(N(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];var n=O(e);if(!n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (first field name illegal)"));for(var o=[n];e.cur<t.length&&N(e);){var r=t[e.cur];if("."===r){if(e.cur+=1,N(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){o.push("**"),e.cur+=2;break}var i=O(e);if(!i)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name illegal)"));o.push(i)}else{if("["!==r)break;e.cur+=1,N(e);var a=k(e);if(N(e),"]"!==t[e.cur])throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));e.cur+=1,o.push(a)}}return o},M=function(e){try{var t=function(e){for(var t=e.str,n=[];e.cur<t.length;){var o=t[e.cur];if("."===o)e.cur+=1,""!==(i=x(e))&&n.push(i);else if("["===o){e.cur+=1;var r=k(e);if("]"!==t[e.cur]&&e.cur<t.length)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));e.cur+=1,n.push(r)}else{var i=x(e);n.push(i)}}return 0===n.length&&n.push(""),n}({str:e,cur:0});return t}catch(e){return rt(e.message),null}},L=function(e){try{if(Array.isArray(e))return e.map((function(e){return A({str:e,cur:0})}));var t={str:e,cur:0},n=function(e){var t=[];for(t.push(A(e)),N(e);","===e.str[e.cur];)e.cur+=1,t.push(A(e)),N(e);return t}(t);if(t.cur!==e.length)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur));return n}catch(e){return rt(e.message),[]}},D=function(e,t){if("object"==typeof e&&null!==e){var n=t.get(e);if(void 0!==n)return n;if(Array.isArray(e)){var o=[];t.set(e,o);for(var r=0;r<e.length;r+=1)o[r]=D(e[r],t);return o}var i={};t.set(e,i);var a=Object.keys(e);for(r=0;r<a.length;r+=1){var s=a[r];i[s]=D(e[s],t)}return i}return"symbol"==typeof e?Symbol(e.description):e},T=function(e){if("object"==typeof e&&null!==e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n+=1)t[n]=T(e[n]);return t}var o={},r=Object.keys(e);for(n=0;n<r.length;n+=1){var i=r[n];o[i]=T(e[i])}return o}return"symbol"==typeof e?Symbol(e.description):e},I=function(e,t){return t?D(e,new WeakMap):T(e)},R=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},B=Object.prototype.hasOwnProperty;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(v||(v={}));var P,j=function(){function e(e){this.observerTree={sub:{}},this.observers=[],this.propFields=e}return e.prototype.cloneSub=function(){var t=new e(this.propFields);return this.observers.length>0&&(t.observerTree=T(this.observerTree),t.observers=this.observers.slice()),t},e.prototype.addObserver=function(e,t){var n=this.observers.length;this.observers.push({path:t,f:e});for(var o=0;o<t.length;o+=1){for(var r=t[o],i=this.observerTree,a=!1,s=0;s<r.length;s+=1){var l=r[s];if("**"===l){a=!0;break}i.sub[l]||(i.sub[l]={sub:{}}),i=i.sub[l]}a?i.wildcard?i.wildcard.push(n):i.wildcard=[n]:i.listener?i.listener.push(n):i.listener=[n]}},e}(),F=function(e,t,n,o){for(var r=new Array(n.length),i=0;i<n.length;i+=1){for(var a=n[i],s=t,l=0;l<a.length;l+=1){var c=a[l];if("**"===c)break;if("object"!=typeof s||null===s){s=void 0;break}s=s[c]}r[i]=s}ct("Data Observer",o,e.getMethodCaller(),r,e||void 0)},U=function(e,t){if(e.listener)for(var n=0;n<e.listener.length;n+=1)t[e.listener[n]]=!0;if(e.wildcard)for(n=0;n<e.wildcard.length;n+=1)t[e.wildcard[n]]=!0;var o=Object.keys(e.sub);for(n=0;n<o.length;n+=1){var r=o[n];U(e.sub[r],t)}},G=function(e,t,n){for(var o=e,r=!0,i=0;i<n.length;i+=1){var a=n[i];if(o.wildcard)for(var s=o.wildcard,l=0;l<s.length;l+=1)t[s[l]]=!0;if(!B.call(o.sub,a)){r=!1;break}o=o.sub[a]}r&&U(o,t)},W=function(e,t,n,o){for(var r=0;r<e.length;r+=1){var i=e[r],a=i.path,s=i.f;t[r]&&(t[r]=!1,n&&F(n,o,a,s))}},V=function(e){return e===qe.Simple?1:e===qe.SimpleWithRecursion?2:0},H=function(){function e(e,t,n,o,r,i,a){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=o,this._$propertyPassingDeepCopy=r,this._$reflectToAttributes=i&&!!e,this._$propFields=a.propFields,this._$observerTree=a.observerTree,this._$observers=a.observers,this._$observerStatus=new Array(a.observers.length),this.innerData=this._$generateInnerData(t)}return e.prototype._$generateInnerData=function(e){var t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){for(var o={},r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a];t&&t.test(a)||(o[a]=0===n?s:2===n?I(s,!0):T(s))}return o}return null},e.create=function(t){return new e(null,t,null,0,0,!1,new j({}))},e.prototype.setUpdateListener=function(e){this._$updateListener=e},e.prototype.replaceWholeData=function(e){this.data=e,this.innerData=this._$generateInnerData(e)},e.prototype.replaceDataOnPath=function(e,t){this._$pendingChanges.push([e,t,void 0,void 0])},e.prototype.spliceArrayDataOnPath=function(e,t,n,o){Array.isArray(o)?this._$pendingChanges.push([e,o,null!=t?t:-1,n||0]):rt('The splice insertion must be a string (on path "'.concat(e.join("."),'"). The change is ignored.'))},e.prototype.replaceProperty=function(e,t){var n=t;return!!this._$propFields[e]&&(0!==this._$propertyPassingDeepCopy&&(n=2===this._$propertyPassingDeepCopy?I(t,!0):T(t)),this._$pendingChanges.push([[e],n,void 0,void 0]),!0)},e.prototype.setChanges=function(e){this._$pendingChanges=e},e.prototype.getChanges=function(){return this._$pendingChanges},e.prototype.setModelBindingListener=function(e,t){this._$modelBindingListener?this._$modelBindingListener[e]=t:(this._$modelBindingListener=Object.create(null))[e]=t},e.prototype.applyDataUpdates=function(e){var t,n,o;void 0===e&&(e=!1);var r,i,a=this._$propFields,s=this._$comp,l=this._$pureDataPattern,c=this._$dataDeepCopy,u=!!this._$doingUpdates;this._$observers.length>0?this._$doingUpdates?(r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(r=[],i=[]);var d=this._$pendingChanges;this._$pendingChanges=[];for(var p=0;p<d.length;p+=1){var h=d[p],f=h[0],v=h[1],g=h[2],_=h[3],$=void 0!==_,m=String(f[0]),y=!!l&&l.test(m),b=!0;if((q=a[m])&&1===f.length){var S=this.data[m],C=void 0,w=void 0;if($){if(Array.isArray(S)){var E=h;C=g>=0&&g<S.length?g:S.length,E[2]=C,S.splice.apply(S,R([C,_],v,!1))}else rt('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'));w=S}else w=Ce(v,m,q);if(!y&&this.innerData){var N=void 0;if(0===c)h[1]=N=w;else if(void 0!==C){N=this.innerData[m];var k=void 0;h[1]=k=2===c?I(v,!0):T(v),(t=N).splice.apply(t,R([C,_],k,!1))}else h[1]=N=2===c?I(w,!0):T(w);this.innerData[m]=N}if(this.data[m]=w,this._$reflectToAttributes){var O=s.getBackendElement();if(O){var x=w;if(q.reflectIdPrefix){var A=s.ownerShadowRoot;if(A){var M=A.getHostNode()._$idPrefix;M&&(x="".concat(M,"--").concat(w))}}var L=m.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),D=typeof x;"boolean"===D?w?O.setAttribute(L,""):O.removeAttribute(L):"object"===D?O.setAttribute(L,JSON.stringify(x)):O.setAttribute(L,x)}}b=q.comparer?!!ct("Property Comparer",q.comparer,s,[v,S],null==s?void 0:s.general()):S!==w,!y&&b&&i.push({propName:m,prop:q,oldValue:S,newValue:w,skipModelListener:e})}else{for(var P=this.data,j=m,F=1;F<f.length;F+=1){var U=f[F];Number.isFinite(U)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=U}if(C=void 0,$?(S=P[j],Array.isArray(S)?(E=h,C=g>=0&&g<S.length?g:S.length,E[2]=C,S.splice.apply(S,R([C,_],v,!1))):rt('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'))):P[j]=v,!y&&this.innerData){P=this.innerData,j=m;for(var V=1;V<f.length;V+=1)U=f[V],Number.isFinite(U)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=U;N=void 0,0===c?h[1]=N=v:void 0!==C?(N=P[j],k=void 0,h[1]=k=2===c?I(v,!0):T(v),(n=N).splice.apply(n,R([C,_],k,!1))):h[1]=N=2===c?I(v,!0):T(v),P[j]=N}!y&&q&&i.push({propName:m,prop:q,oldValue:void 0,newValue:v,skipModelListener:e||!1})}G(this._$observerTree,this._$observerStatus,f),!y&&b&&r.push(h),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!u){if(this._$doingUpdates){var H=void 0;do{H=this._$doingUpdates.count,W(this._$observers,this._$observerStatus,s,this.data)}while(H!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(o=this._$updateListener)||void 0===o||o.call(this,this.innerData||this.data,r),s)for(p=0;p<i.length;p+=1){var z=i[p],q=(m=z.propName,z.prop),X=z.oldValue,K=z.newValue;if(!z.skipModelListener&&this._$modelBindingListener){var Y=this._$modelBindingListener[m];Y&&Y(K)}q.observer&&ct("Property Observer",q.observer,s.getMethodCaller(),[K,X],s),s._$mutationObserverTarget&&ft.callAttrObservers(s,{type:"properties",target:s,propertyName:m})}}},e}();!function(e){e[e.Normal=0]="Normal",e[e.NoDefault=1]="NoDefault"}(P||(P={}));var z,q,X=Date.now(),K=X;!function(e){e[e.None=0]="None",e[e.Mut=1]="Mut",e[e.Final=2]="Final"}(z||(z={})),function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.None=2]="None",e[e.Final=3]="Final",e[e.Mut=4]="Mut"}(q||(q={}));var Y,Z=function(){function e(){this.listeners=Object.create(null),this.captureListeners=null}return e.prototype.addListener=function(e,t,n){void 0===n&&(n={});var o,r,i,a=n.final?2:n.mutated?1:0;return n.capture||n.useCapture?this.captureListeners?o=this.captureListeners:(o=Object.create(null),this.captureListeners=o):o=this.listeners,o[e]?(i=!0,r=o[e]):(i=!1,r=o[e]={mutCount:0,finalCount:0,funcArr:new lt}),r.funcArr.add(t,a),2===a?(r.finalCount+=1,i&&1!==r.finalCount?0:3):1===a?(r.mutCount+=1,!i||1===r.mutCount&&0===r.finalCount?4:0):i?0:2},e.prototype.removeListener=function(e,t,n){void 0===n&&(n={});var o=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!o)return 1;var r=o[e];if(!r)return 1;var i=r.funcArr.remove(t);return null===i?1:2===i?(r.finalCount-=1,0!==r.finalCount?0:r.mutCount>0?4:2):1===i?(r.mutCount-=1,0!==r.mutCount||0!==r.finalCount?0:2):0},e}(),Q=function(){function e(e,t,n){void 0===n&&(n={});var o=function(){var e=Date.now();return e<K&&(X+=e-K),K=e,e-X}();this.type=e,this.timeStamp=o,this.detail=t,this.bubbles=n.bubbles||!1,this.composed=n.composed||!1,this._$capturePhase=n.capturePhase||!1,this._$eventBubblingControl={stopped:!1,mutated:!1,noDefault:!1},this._$originalEvent=n.originalEvent,this._$dispatched=!1,n.extraFields&&Object.assign(this,n.extraFields)}return e.prototype.getEventBubbleStatus=function(){return this._$eventBubblingControl.noDefault?1:0},e.prototype.wrapShadowedEvent=function(e,t,n){var o=Object.create(this);return o.target=e,o.mark=t,o.currentTarget=n,o},e.prototype.getOriginalEvent=function(){return this._$originalEvent},e.prototype.preventDefault=function(){this._$eventBubblingControl.noDefault=!0},e.prototype.defaultPrevented=function(){return this._$eventBubblingControl.noDefault},e.prototype.stopPropagation=function(){this._$eventBubblingControl.stopped=!0},e.prototype.propagationStopped=function(){return this._$eventBubblingControl.stopped},e.prototype.markMutated=function(){this._$eventBubblingControl.mutated=!0},e.prototype.mutatedMarked=function(){return this._$eventBubblingControl.mutated},e.prototype.callListener=function(e,t,n,o){var r=this.type,i=e._$eventTarget;if(i){var a=o?i.captureListeners:i.listeners;if(a){var s=a[r];if(s){var l=this.mutatedMarked(),c=n instanceof $e&&n.getMethodCaller()||n,u=e instanceof $e&&e.getMethodCaller()||e,d=this.wrapShadowedEvent(c,t,u);!1===s.funcArr.call(u,[d],(function(e){return!l||1!==e}),n instanceof $e?n:void 0)||s.finalCount>0?(d.stopPropagation(),d.preventDefault()):s.mutCount>0&&d.markMutated()}}}},e.prototype.dispatch=function(e,t){var n=this;if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;var o=this.composed,r=this.bubbles,i=t&&!o,a=this._$eventBubblingControl,s=function(e,t){for(var n=function(e){for(var r=e,i=e.collectMarks();;){if(!1===t(r,e,i))return null;var a=void 0;if(o){if(r instanceof St)return r.getHostNode();if(null===r.containingSlot)return null;if(r.containingSlot)a=n(r.containingSlot);else for(a=r.parentNode;null==a?void 0:a._$inheritSlots;)a=a.parentNode}else a=r.parentNode;if(!a)return null;r=a}},r=e;;){var i=n(r);if(!i)break;r=i}};if(this._$capturePhase&&!a.stopped&&!i){var l=[];s(e,(function(e,t,n){l.push([e,t,n])}));for(var c=l.length-1;c>=0;c-=1){var u=l[c],d=u[0],p=u[1],h=u[2];if(d._$eventTarget&&(this.callListener(d,h,p,!0),a.stopped))break}}if(!a.stopped&&t&&e instanceof $e&&e._$external&&e.shadowRoot.handleEvent(t,this),!a.stopped&&!i){var f=!0;s(e,(function(e,t,o){if(!f&&e instanceof $e&&e._$external){var i=e.shadowRoot;i.handleEvent(i.slot,n)}return f=!1,e._$eventTarget&&n.callListener(e,o,t,!1),r&&!a.stopped}))}},e.dispatchEvent=function(e,t){return t.dispatch(e)},e.dispatchExternalEvent=function(e,t,n){return n.dispatch(e,t)},e.triggerEvent=function(t,n,o,r){var i=new e(n,o,r);e.dispatchEvent(t,i)},e.triggerExternalEvent=function(t,n,o,r,i){var a=new e(o,r,i);e.dispatchExternalEvent(t,n,a)},e}();!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Y||(Y={}));var J,ee=function(e){var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace},te=function(){function e(t){this.unions=[];for(var n=String(t||"").split(","),o=0;o<n.length;o+=1){for(var r=n[o].split(/( |\t|>+)/g),i=[],a=1,s=0;s<r.length;s+=1){var l=r[s];if(l&&" "!==l&&"\t"!==l&&">>"!==l)if(">"!==l[0]){var c=e._$parseSegment(l,a);if(a=1,!c)break;i.push(c)}else{if(1!==a)break;a=3===l.length?2:0}}s===r.length&&i.length&&this.unions.push(i)}}return e._$parseSegment=function(e,t){var n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(e);if(!n)return null;var o=n[1].slice(1),r=n[2].split(".");return r.shift(),o||r.length?{id:o,classes:r,relation:t}:null},e.prototype.isEmpty=function(){return 0===this.unions.length},e._$testSelectorSegment=function(t,n,o,r,i,a){var s;if(o===t)return!1;var l=r[i],c=!0;(ee(o)!==n||l.id&&l.id!==o.id)&&(c=!1);for(var u=l.classes,d=0;c&&d<u.length;d+=1)(null===(s=o.classList)||void 0===s?void 0:s.contains(u[d]))||(c=!1);if(!c&&0===a)return!1;var p=o;if(c&&0===i){if(null===t)return!0;for(p=p.parentNode;p;p=p.parentNode)if(p===t)return!0;if(2!==a)return!1;p=o,c=!1}var h=c?l.relation:a;do{p.parentNode?p=p.parentNode:2===h?p=p instanceof St?p.getHostNode():null:2===a?(c=!1,p=p instanceof St?p.getHostNode():null):p=null,p===t&&(p=null)}while(p instanceof se);if(!p)return!1;if(c){if(e._$testSelectorSegment(t,n,p,r,i-1,h))return!0;if(2!==a)return!1}return e._$testSelectorSegment(t,n,p,r,i,a)},e.prototype.testSelector=function(t,n){if(n instanceof se)return!1;var o,r=this.unions;if(void 0===(o=null!==t&&ee(t)||ee(n)))return!1;for(var i=0;i<r.length;i+=1){var a=r[i];if(e._$testSelectorSegment(t,o,n,a,a.length-1,0))return!0}return!1},e.prototype.query=function(e,t){var n=this,o=[],r=function(e,t,i){if(n.testSelector(e,t)){if(i)return t;o.push(t)}if(t instanceof $e){var a=t.getShadowRoot();if(a){var s=r(e,a,i);if(s&&i)return s}}for(var l=t.childNodes,c=0;c<l.length;c+=1){var u=l[c];if(u instanceof re){var d=r(e,u,i);if(d&&i)return d}}return null},i=r(e,e,t);return t?i:o},e}(),ne=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};!function(e){e[e.MAIN=0]="MAIN",e[e.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",e[e.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",e[e.TEMP_EXTRA=3]="TEMP_EXTRA"}(J||(J={}));var oe,re=function(){function e(){throw new Error("Element cannot be constructed directly")}return e.prototype._$initialize=function(e,t,n,o){this._$backendElement=t,this._$destroyOnDetach=!1,this._$nodeTreeContext=o,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotElement=null,this._$slotValues=null,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$inheritSlots=!1,this._$placeholderHandler=void 0,this._$virtual=e,this.dataset={},this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.parentIndex=-1,this.childNodes=[],this.slotNodes=void 0,this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new Z},Object.defineProperty(e.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._$nodeId},set:function(e){var t,n,o=String(e);if(this._$nodeId!==o){if(this._$nodeId=o,this.ownerShadowRoot){var r=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),r.getComponentOptions().writeIdToDOM){var i=r._$idPrefix,a=i?"".concat(i,"--").concat(o):o;if(3===this.getBackendMode()){var s=this._$backendElement;s&&(s.id=a)}else null===(t=this._$backendElement)||void 0===t||t.setId(a)}}tt.writeExtraInfoToAttr&&(null===(n=this._$backendElement)||void 0===n||n.setAttribute("exparser:info-attr-id",o)),this._$mutationObserverTarget&&ft.callAttrObservers(this,{type:"properties",target:this,attributeName:"id"})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"slot",{get:function(){return this._$nodeSlot},set:function(t){var n=String(t);if(this._$nodeSlot!==n)if(this._$inheritSlots)rt('slots-inherited nodes do not support "slot" attribute.');else{this._$nodeSlot=n;var o=e._$getParentHostShadowRoot(this.parentNode);if(o){var r=o.getSlotMode();if(3===r)return void rt("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");if(0===r)return void rt("nodes inside direct slots should not change slot name.");var i=St._$updateSubtreeSlotNodes(this.parentNode,[this],o,o,this.parentIndex);null==i||i.removeSlotNodes();var a=this.containingSlot;null==i||i.updateContainingSlot();var s=this.containingSlot;e.insertChildReassign(this.parentNode,this,a,s,this.parentIndex+1),null==i||i.insertSlotNodes()}this._$mutationObserverTarget&&ft.callAttrObservers(this,{type:"properties",target:this,attributeName:"slot"})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var e=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((function(t){var n=t[0],o=t[1];e.push({name:n,value:o})})),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"class",{get:function(){return this.classList?this.classList.getClassNames():""},set:function(e){this.classList&&this.classList.setClassNames(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._$styleSegments[0]||""},set:function(e){this.setNodeStyle(e,0)},enumerable:!1,configurable:!0}),e.prototype.asTextNode=function(){return null},e.prototype.asElement=function(){return this},e.prototype.asNativeNode=function(){return this instanceof $t?this:null},e.prototype.asVirtualNode=function(){return this instanceof se?this:null},e.prototype.asInstanceOf=function(e){return this instanceof $e?this.asInstanceOf(e):null},e.prototype.getBackendContext=function(){return this._$nodeTreeContext},e.prototype.getBackendMode=function(){return this._$nodeTreeContext.mode},e.prototype.getBackendElement=function(){return this._$backendElement},e.prototype.destroyBackendElement=function(){this._$backendElement&&(3!==this.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.cancelDestroyBackendElementOnDetach=function(){this._$destroyOnDetach=!1},e.prototype.isVirtual=function(){return this._$virtual},e.prototype.setNodeClass=function(e,t){var n;void 0===t&&(t=0),null===(n=this.classList)||void 0===n||n.setClassNames(e,t)},e.prototype.setNodeStyle=function(e,t){if(void 0===t&&(t=0),this._$styleSegments[t]!==e){this._$styleSegments[t]=e;var n=this._$styleSegments.join(";");this._$backendElement&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):this._$backendElement.setStyle(n)),this._$mutationObserverTarget&&ft.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}},e.checkAndCallAttached=function(t){!function t(n){if(n instanceof e&&!n._$attached){if(n._$attached=!0,n instanceof $e){n.triggerLifetime("attached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1)),n._$mutationObserverTarget&&ft.callAttachObservers(n,{type:"attachStatus",target:n,status:"attached"});var o=n.getShadowRoot();o&&t(o)}for(var r=n.childNodes,i=0;i<r.length;i+=1)t(r[i])}}(t)},e.checkAndCallDetached=function(t){!function t(n){if(n._$destroyOnDetach&&n.destroyBackendElement(),n instanceof e&&n._$attached)if(n instanceof $e&&n.triggerLifetime("beforeDetach",[]),n.childNodes.forEach(t),n instanceof $e){var o=n._$placeholderHandler;o&&o();var r=n.getShadowRoot();r&&t(r),n._$attached=!1,n.triggerLifetime("detached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&ft.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1}(t)},e.checkAndCallMoved=function(t){!function t(n){if(n instanceof e&&n._$attached&&(n.childNodes.forEach(t),n instanceof $e)){var o=n.getShadowRoot();o&&t(o),n.triggerLifetime("moved",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1))}}(t)},e.checkChildObservers=function(e,t,n){var o,r=e._$mutationObserverTarget;if(r&&(!(null===(o=r.childObservers)||void 0===o?void 0:o.empty)||r.hasSubtreeListeners())){var i,a=[n];i="add"===t?{type:"childList",target:e,addedNodes:a}:"remove"===t?{type:"childList",target:e,removedNodes:a}:{type:"childList",target:e,addedNodes:a,removedNodes:a},ft.callChildObservers(e,i)}},e.hasSubtreeMutationObservers=function(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1},e._$insertChildReassignSlot=function(t,n,o,r){if(o)if(r)for(i=ne([],o.slotNodes,!0),a=0;a<i.length;a+=1)s=i[a],e._$spliceSlotNodes(o,0,1,void 0),e._$spliceSlotNodes(r,-1,0,[s]),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,o,r,s.parentIndex);else for(var i=ne([],o.slotNodes,!0),a=0;a<i.length;a+=1){var s=i[a];e._$spliceSlotNodes(o,0,1,void 0),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,o,null,s.parentIndex)}else{var l=[];t.forEachNodeInSpecifiedSlot(null,(function(t){null!==n&&(t instanceof e?t._$nodeSlot:"")!==n||l.push(t)}));for(a=0;a<l.length;a+=1){s=l[a];e._$spliceSlotNodes(r,-1,0,[s]),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,null,r,s.parentIndex)}}},e.insertChildReassign=function(t,n,o,r,i){if(1!==t.getBackendMode()){if(o)if(r&&3===t.getBackendMode());else{var a=e.findNearestNonVirtual(o);if(a){var s=e.countNonVirtual(n);if(s){var l=s[0],c=s[1];if(3===t.getBackendContext().mode){for(var u=l._$backendElement,d=1;d<c;d+=1){var p=u.nextSibling;p&&a.removeChild(p)}c>0&&a.removeChild(u)}else a.spliceRemove(l._$backendElement,c)}}}r&&e.insertChildComposed(t,n,void 0,!1,i)}else n._$backendElement.reassignContainingSlot(o?o._$backendElement:null,r?r._$backendElement:null)},e.findNearestNonVirtual=function(e){for(var t=e;null==t?void 0:t._$virtual;)t=t instanceof St?t.getHostNode():void 0===t.containingSlot?t.parentNode:t.containingSlot;return t?t._$backendElement:null},e.countNonVirtual=function(t){var n,o=null,r=0,i=function(e){0===r&&(o=e),r+=1};return(n=t)instanceof e&&n._$virtual?n.forEachNonVirtualComposedChild(i):i(n),o?[o,r]:null},e.forEachNodeInSlot=function(e,t){var n=function(e){if(!1===t(e,e.containingSlot))return!1;if(e._$inheritSlots){for(var o=e.childNodes,r=0;r<o.length;r+=1)if(!n(o[r]))return!1;return!0}return!0};return n(e)},e.forEachNodeInSpecificSlot=function(e,t,n){var o=function(e){if(e.containingSlot===t&&!1===n(e))return!1;if(e._$inheritSlots){for(var r=e.childNodes,i=0;i<r.length;i+=1)if(!o(r[i]))return!1;return!0}return!0};return o(e)},e.forEachSlotContentInSlot=function(e,t){var n=function(e){if(e._$inheritSlots){for(var o=e.childNodes,r=0;r<o.length;r+=1)if(!n(o[r]))return!1;return!0}return!1!==t(e,e.containingSlot)};return n(e)},e.forEachSlotContentInSpecificSlot=function(e,t,n){var o=function(e){if(e._$inheritSlots){for(var r=e.childNodes,i=0;i<r.length;i+=1)if(!o(r[i]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return o(e)},e._$findFirstNonVirtualChild=function(t,n){var o=null!==t._$slotName,r=o?t.slotNodes:t.childNodes;if(n>=0&&n<r.length)for(var i=function(e){var t=null,n=function(e){return t=e,!1},i=function(e){if(!o&&e._$inheritSlots)for(var t=e.childNodes,r=0;r<t.length;r+=1)if(!1===i(t[r]))return!1;return e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)};if(i(r[e]),t)return{value:t}},a=n;a<r.length;a+=1){var s=i(a);if("object"==typeof s)return s.value}if(!t._$virtual)return null;var l=t.containingSlot;if(null===l)return null;if(void 0!==l)return e._$findFirstNonVirtualChild(l,t.slotIndex+1);var c=t;if(t instanceof St&&!(c=t.getHostNode())._$virtual)return null;var u=c.parentNode;return u?e._$findFirstNonVirtualChild(u,c.parentIndex+1):null},e._$findFirstNonVirtualSibling=function(t,n){var o=t.containingSlot;if(null===o)return null;if(void 0!==o){if(!o._$virtual)return null;if(void 0!==t.slotIndex)return e._$findFirstNonVirtualChild(o,t.slotIndex+1);var r=e._$findSlotNodeInsertPosition(o,t,n);return e._$findFirstNonVirtualChild(o,r)}var i=t;if(t instanceof St&&!(i=t.getHostNode())._$virtual)return null;var a=i.parentNode;return a?e._$findFirstNonVirtualChild(a,n):null},e.insertChildComposed=function(t,n,o,r,i){for(var a,s,l,c=!1,u=t;null==u?void 0:u._$inheritSlots;)c=!0,u=u.parentNode;if(u){var d,p=u,h=p._$nodeTreeContext;p instanceof $e?p._$external?d=p.shadowRoot.slot:c=!0:(p._$virtual&&(c=!0),d=e.findNearestNonVirtual(p));var f=null,v=function(a,s){var l=a||(s?e.findNearestNonVirtual(s):null);if(3===t.getBackendMode()||l){var u=0,d=null,p=null,v=null;if(n){var g=f||(3===h.mode?h.document.createDocumentFragment():h.createFragment());f=g;var _=function(e){g.appendChild(e._$backendElement),p=g};e.forEachNodeInSpecificSlot(n,s,(function(e){v||(v=e),e._$virtual?e.forEachNonVirtualComposedChild(_):_(e)}))}if(3!==t.getBackendMode()||l){if((o||c)&&(r&&o?(e.forEachSlotContentInSpecificSlot(o,s,(function(t){if(t instanceof e){var n=e.countNonVirtual(t);n&&(d||(d=n[0]),u+=n[1])}else d||(d=t),u+=1;return!0})),0===u&&p&&v&&(d=e._$findFirstNonVirtualSibling(void 0===s?n:v,i+1))):p&&v&&(d=e._$findFirstNonVirtualSibling(void 0===s?n:v,i))),p)if(d)if(3===h.mode){var $=d._$backendElement;l.insertBefore(p,$);for(var m=1;m<u;m+=1)(y=$.nextSibling)&&l.removeChild(y);u>0&&l.removeChild($)}else l.spliceBefore(d._$backendElement,u,p);else 3===h.mode?l.appendChild(p):l.spliceAppend(p);else if(u>0)if(3===h.mode){for($=d._$backendElement,m=1;m<u;m+=1){var y;(y=$.nextSibling)&&l.removeChild(y)}u>0&&l.removeChild($)}else l.spliceRemove(d._$backendElement,u)}else f=null}};if(void 0!==d)null===d||(c||n instanceof e&&n._$virtual||o instanceof e&&o._$virtual?v(d,void 0):r?n?d.replaceChild(n._$backendElement,o._$backendElement):d.removeChild(o._$backendElement):o?d.insertBefore(n._$backendElement,o._$backendElement):d.appendChild(n._$backendElement));else if(n&&n._$inheritSlots||r&&o&&o._$inheritSlots){var g=new Set;r&&o&&e.forEachSlotContentInSlot(o,(function(e,t){g.add(t)})),n&&e.forEachSlotContentInSlot(n,(function(e,t){g.add(t)})),g.forEach((function(e){return v(null,e)}))}else n&&v(null,n.containingSlot),!r||!o||n&&o.containingSlot===n.containingSlot||v(null,o.containingSlot);3!==h.mode&&f&&f.release(),tt.writeExtraInfoToAttr&&(r&&o instanceof e&&(null===(a=o._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")),n instanceof e&&(t instanceof $e?null===(s=n._$backendElement)||void 0===s||s.setAttribute("exparser:info-in-slot-of",t._$componentInstanceId):null===(l=n._$backendElement)||void 0===l||l.removeAttribute("exparser:info-in-slot-of")))}},e._$updateSubtreeSlotsInsertion=function(e,t,n,o,r){if(t&&n){var i=e,a=null,s=null,l=function(e,t){if(e._$subtreeSlotStart){for(var n=e.childNodes,o=t+1,r=n[o];r&&!r._$subtreeSlotStart;)r=n[o+=1];r?(s=r._$subtreeSlotStart,a=s.prev):(a=e._$subtreeSlotEnd)&&(s=a.next)}else{for(var i=e,c=e.parentNode;c&&!c._$subtreeSlotStart;)i=c,c=c.parentNode;c&&l(c,i.parentIndex)}};for(l(i,o),a&&(a.next=t,t.prev=a),s&&(s.prev=n,n.next=s);i;){var c=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===s?(i._$subtreeSlotStart=t,c=!0):i._$subtreeSlotEnd===a&&(i._$subtreeSlotEnd=n,c=!0):(i._$subtreeSlotStart=t,i._$subtreeSlotEnd=n,c=!0),!c||!i.parentNode)break;i=i.parentNode}var u=i.ownerShadowRoot;(null==u?void 0:u.isConnected(i))&&u._$applySlotsInsertion(t,n,r)}},e._$updateSubtreeSlotsRemoval=function(e,t,n,o){if(t&&n){var r=e,i=t.prev,a=n.next;for(i&&(i.next=a,t.prev=null),a&&(a.prev=i,n.next=null);r;){var s=!1;if(r._$subtreeSlotStart===t&&r._$subtreeSlotEnd===n&&(r._$subtreeSlotStart=r._$subtreeSlotEnd=null,s=!0),r._$subtreeSlotStart===t?(r._$subtreeSlotStart=a,s=!0):r._$subtreeSlotEnd===n&&(r._$subtreeSlotEnd=i,s=!0),!s||!r.parentNode)break;r=r.parentNode}var l=r.ownerShadowRoot;(null==l?void 0:l.isConnected(r))&&l._$applySlotsRemoval(t,n,o)}},e._$updateSubtreeSlotsReplacement=function(t,n,o,r,i,a,s){if(n&&o)if(r&&i){var l=t,c=r.prev,u=i.next;for(c&&(c.next=n,n.prev=c,r.prev=null),u&&(u.prev=o,o.next=u,i.next=null);l;){var d=!1;if(l._$subtreeSlotStart===r&&(l._$subtreeSlotStart=n,d=!0),l._$subtreeSlotEnd===i&&(l._$subtreeSlotEnd=o,d=!0),!d||!l.parentNode)break;l=l.parentNode}var p=l.ownerShadowRoot;(null==p?void 0:p.isConnected(l))&&(p._$applySlotsRemoval(r,i,!1),p._$applySlotsInsertion(n,o,s))}else e._$updateSubtreeSlotsInsertion(t,n,o,a,s);else e._$updateSubtreeSlotsRemoval(t,r,i,s)},e.insertChildSingleOperation=function(t,n,o,r){var i,a,s,l,c;if(n&&t.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");var u,d=o,p=d>=0?t.childNodes[d]:void 0;if((u=!!r&&!!p&&n!==p)||n){var h;if(n){if(h=n.parentNode){var f=h.childNodes,v=n.parentIndex;f.splice(v,1);for(var g=v;g<f.length;g+=1)f[g].parentIndex=g;n.parentIndex=-1,h===t&&v<d&&(d-=1);var _=St._$updateSubtreeSlotNodes(t,[n],null,e._$getParentHostShadowRoot(h),d);null==_||_.removeSlotNodes(),3===t.getBackendMode()||(1===t.getBackendMode()?null===(i=h._$backendElement)||void 0===i||i.removeChild(n._$backendElement,v):e.insertChildComposed(h,null,n,!0,v)),null==_||_.updateContainingSlot()}n.parentNode=t,n instanceof e&&h!==t&&(h&&(null===(a=h._$mutationObserverTarget)||void 0===a||a.detachChild(n)),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(n))}else h=null;var $=e._$getParentHostShadowRoot(t),m=n?St._$updateSubtreeSlotNodes(t,[n],$,null,d):null,y=p&&u?St._$updateSubtreeSlotNodes(t,[p],null,$,d):null;null==m||m.updateContainingSlot(),null==y||y.removeSlotNodes(),1===t.getBackendMode()?t._$backendElement&&(u?n?t._$backendElement.replaceChild(n._$backendElement,p._$backendElement,d):t._$backendElement.removeChild(p._$backendElement,d):p?t._$backendElement.insertBefore(n._$backendElement,p._$backendElement,d):t._$backendElement.appendChild(n._$backendElement)):e.insertChildComposed(t,n,p,u,d),null==m||m.insertSlotNodes(),null==y||y.updateContainingSlot(),u&&p&&(p instanceof e&&(null===(l=t._$mutationObserverTarget)||void 0===l||l.detachChild(p)),p.parentNode=null,p.parentIndex=-1);var b=t.childNodes;if(n)if(d<0)b.push(n),n.parentIndex=b.length-1;else if(u)b[d]=n,n.parentIndex=d;else for(b.splice(d,0,n),g=d;g<b.length;g+=1)b[g].parentIndex=g;else if(u)for(b.splice(d,1),g=d;g<b.length;g+=1)b[g].parentIndex=g;var S=n?n._$subtreeSlotStart:null,C=n?n._$subtreeSlotEnd:null,w=p?p._$subtreeSlotStart:null,E=p?p._$subtreeSlotEnd:null;n?(h&&e._$updateSubtreeSlotsRemoval(h,S,C,!0),u?e._$updateSubtreeSlotsReplacement(t,S,C,w,E,d,!!h):e._$updateSubtreeSlotsInsertion(t,S,C,d,!!h)):u&&p&&e._$updateSubtreeSlotsRemoval(t,w,E,!1),null===(c=t.ownerShadowRoot)||void 0===c||c._$markIdCacheDirty(),u&&(e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p)),n&&((null==h?void 0:h._$attached)?t._$attached?e.checkAndCallMoved(n):e.checkAndCallDetached(n):t._$attached&&e.checkAndCallAttached(n),h===t?e.checkChildObservers(t,"move",n):(h&&e.checkChildObservers(h,"remove",n),e.checkChildObservers(t,"add",n)))}},e.insertChildBatchRemoval=function(t,n,o){for(var r,i,a=t.childNodes[n],s=t;null==s?void 0:s._$inheritSlots;)s=s.parentNode;for(var l=s instanceof $e&&!s._$external?s.shadowRoot:null,c=t.childNodes,u=c.splice(n,o),d=n;d<c.length;d+=1)c[d].parentIndex=d;var p=St._$updateSubtreeSlotNodes(t,u,null,l,n);if(null==p||p.removeSlotNodes(),1===t.getBackendMode())t._$backendElement&&t._$backendElement.spliceRemove(a._$backendElement,o);else for(d=o-1;d>=0;d-=1)e.insertChildComposed(t,null,u[d],!0,d);for(d=0;d<o;d+=1){var h=u[d];h.parentNode=null,h.parentIndex=-1,h instanceof e&&(null===(r=t._$mutationObserverTarget)||void 0===r||r.detachChild(h))}null==p||p.updateContainingSlot();var f=null,v=null;for(d=0;d<o;d+=1){var g=u[d];f||(f=g._$subtreeSlotStart),g._$subtreeSlotEnd&&(v=g._$subtreeSlotEnd)}for(e._$updateSubtreeSlotsRemoval(t,f,v,!1),null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),d=0;d<o;d+=1){var _=u[d];e.checkAndCallDetached(_),e.checkChildObservers(t,"remove",_)}},e.insertChildBatchInsertion=function(t,n,o){for(var r,i,a=o>=0?t.childNodes[o]:void 0,s=t;null==s?void 0:s._$inheritSlots;)s=s.parentNode;var l,c=s instanceof $e&&!s._$external?s.shadowRoot:null;l=1===t.getBackendMode()&&n.length>=5?t.getBackendContext().createFragment():null;for(var u=0;u<n.length;u+=1){var d=n[u];if(t.ownerShadowRoot!==d.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(d.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(d.parentNode=t,d instanceof e&&(null===(r=t._$mutationObserverTarget)||void 0===r||r.attachChild(d)),1===t.getBackendMode()&&l){var p=d._$backendElement;l.appendChild(p)}}var h=St._$updateSubtreeSlotNodes(t,n,c,null,o);if(null==h||h.updateContainingSlot(),1===t.getBackendMode()){if(t._$backendElement)if(l)a?t._$backendElement.spliceBefore(a._$backendElement,0,l):t._$backendElement.spliceAppend(l),l.release();else if(a)for(u=0;u<n.length;u+=1)d=n[u],t._$backendElement.insertBefore(d._$backendElement,a._$backendElement);else for(u=0;u<n.length;u+=1)d=n[u],t._$backendElement.appendChild(d._$backendElement)}else{var f=o>=0?o:t.childNodes.length;for(u=0;u<n.length;u+=1)d=n[u],e.insertChildComposed(t,d,a,!1,f)}null==h||h.insertSlotNodes();var v=t.childNodes;if(a)for(v.splice.apply(v,ne([o,0],n,!1)),u=o;u<v.length;u+=1)v[u].parentIndex=u;else for(v.push.apply(v,n),u=v.length-n.length;u<v.length;u+=1)v[u].parentIndex=u;var g=null,_=null;for(u=0;u<n.length;u+=1){var $=(d=n[u])._$subtreeSlotStart,m=d._$subtreeSlotEnd;$&&(_?($.prev=_,_.next=$,_=m):(g=$,_=m))}for(e._$updateSubtreeSlotsInsertion(t,g,_,o+n.length-1,!1),null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),u=0;u<n.length;u+=1)d=n[u],t._$attached&&e.checkAndCallAttached(d),e.checkChildObservers(t,"add",d)},e.insertChildPlaceholderReplace=function(t,n,o){var r,i,a,s,l,c,u,d;if(o&&t.ownerShadowRoot!==o.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(o.parentNode)throw new Error("Cannot replace with the node which already has a parent.");var p=t.childNodes[n];if(!(p instanceof e))throw new Error("Cannot replace on text nodes.");if(null!==p._$slotName||null!==o._$slotName)throw new Error("Cannot replace on slot nodes.");if(p!==o){var h;h=1===t.getBackendMode()?t.getBackendContext().createFragment():null;var f=p.childNodes;1===t.getBackendMode()&&f.length>0&&(null===(i=p._$backendElement)||void 0===i||i.spliceRemove(f[0]._$backendElement,f.length));for(var v=0;v<f.length;v+=1){var g=f[v];if(3===t.getBackendMode());else if(1===t.getBackendMode()){var _=g._$backendElement;h.appendChild(_)}else e.insertChildComposed(p,null,g,!0,v);g.parentNode=o,g instanceof e&&(null===(a=p._$mutationObserverTarget)||void 0===a||a.detachChild(g),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(g))}p.parentNode=null,p.parentIndex=-1,o.parentNode=t;var $=p.containingSlot;void 0!==$&&(e._$updateContainingSlot(p,void 0),e._$updateContainingSlot(o,$));var m=f.length?St._$updateSubtreeSlotNodes(o,f,e._$getParentHostShadowRoot(o),e._$getParentHostShadowRoot(p),0):null;if(null==m||m.updateContainingSlot(),null==m||m.removeSlotNodes(),t.childNodes[n]=o,o.parentIndex=n,1===t.getBackendMode())t._$backendElement&&(t._$backendElement.replaceChild(o._$backendElement,p._$backendElement,n),null===(l=o._$backendElement)||void 0===l||l.spliceAppend(h)),h.release();else for(p.isVirtual()?e.insertChildComposed(t,o,void 0,!1,n):e.insertChildComposed(t,o,p,!0,n),v=0;v<f.length;v+=1)g=f[v],e.insertChildComposed(o,g,void 0,!1,v);for(null==m||m.insertSlotNodes(),o._$subtreeSlotStart=p._$subtreeSlotStart,o._$subtreeSlotEnd=p._$subtreeSlotEnd,null===(c=t._$mutationObserverTarget)||void 0===c||c.detachChild(p),null===(u=t._$mutationObserverTarget)||void 0===u||u.attachChild(o),(r=o.childNodes).push.apply(r,p.childNodes),v=o.childNodes.length-p.childNodes.length;v<o.childNodes.length;v+=1)o.childNodes[v].parentIndex=v;if(p.childNodes=[],null===(d=t.ownerShadowRoot)||void 0===d||d._$markIdCacheDirty(),t._$attached)for(e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p),e.checkAndCallAttached(o),e.checkChildObservers(t,"add",o),v=0;v<f.length;v+=1)g=f[v],e.checkAndCallMoved(g),e.checkChildObservers(t,"move",g)}},e.prototype.appendChild=function(t){e.insertChildSingleOperation(this,t,this.childNodes.length,!1)},e.prototype.insertChildAt=function(t,n){e.insertChildSingleOperation(this,t,n,!1)},e.prototype.insertBefore=function(t,n){var o=n?n.parentIndex:-1;e.insertChildSingleOperation(this,t,o,!1)},e.prototype.removeChildAt=function(t){e.insertChildSingleOperation(this,null,t,!0)},e.prototype.removeChild=function(t){var n=t.parentIndex;e.insertChildSingleOperation(this,null,n,!0)},e.prototype.replaceChildAt=function(t,n){e.insertChildSingleOperation(this,t,n,!0)},e.prototype.replaceChild=function(t,n){var o=n.parentIndex;e.insertChildSingleOperation(this,t,o,!0)},e.prototype.insertChildren=function(t,n){e.insertChildBatchInsertion(this,t,n)},e.prototype.removeChildren=function(t,n){e.insertChildBatchRemoval(this,t,n)},e.prototype.selfReplaceWith=function(t){var n=this.parentNode;n&&e.insertChildPlaceholderReplace(n,this.parentIndex,t)},e._$generateIdMap=function(t){var n=Object.create(null);return function t(o){if(o instanceof e){var r=o._$nodeId;r&&(n[r]||(n[r]=o)),o.childNodes.forEach(t)}}(t),n},e.prototype.triggerEvent=function(e,t,n){Q.triggerEvent(this,e,t,n)},e.prototype.dispatchEvent=function(e){Q.dispatchEvent(this,e)},e.prototype._$setListenerStats=function(e,t,n){if(void 0===n&&(n={}),this._$backendElement){var o,r=!!n.capture||!!n.useCapture;switch(t){case 2:o=0;break;case 4:o=1;break;case 3:o=2;break;default:return}3===this.getBackendMode()?this._$nodeTreeContext.setListenerStats(this._$backendElement,e,r,o):this._$backendElement.setListenerStats(e,r,o)}},e.prototype.addListener=function(e,t,n){var o=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,o,n),this instanceof $e&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])},e.prototype.removeListener=function(e,t,n){var o=this._$eventTarget.removeListener(e,t,n);1!==o&&(this._$setListenerStats(e,o,n),this instanceof $e&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,e,t,n]))},e.prototype.getAttribute=function(e){return this._$nodeAttributes?this._$nodeAttributes[e]:null},e.prototype.updateAttribute=function(e,t){3===this.getBackendMode()?"boolean"==typeof t?!0===t?this.setAttribute(e,""):this.removeAttribute(e):this.setAttribute(e,null==t?"":String(t)):void 0===t?this.removeAttribute(e):this.setAttribute(e,t)},e.prototype.setAttribute=function(e,t){var n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[e]=t,this._$backendElement&&this._$backendElement.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this._$nodeAttributes&&delete this._$nodeAttributes[e],this._$backendElement&&this._$backendElement.removeAttribute(e)},e.prototype.setDataset=function(e,t){this.dataset[e]=t,1===this.getBackendMode()&&this._$backendElement.setDataset(e,t)},e.prototype.setMark=function(e,t){if(this._$marks)this._$marks[e]=t;else{var n={};n[e]=t,this._$marks=n}},e.prototype.collectMarks=function(){var e,t={},n=function(){var n=e._$marks;n&&Object.keys(n).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n[e])}))};for(e=this;e;e=e.parentNode)n();return t},e.replaceDocumentElement=function(t,n,o){if(t._$attached)throw new Error("An attached element cannot be attached again");t._$backendElement&&n.replaceChild(t._$backendElement,o),e.checkAndCallAttached(t)},e.pretendAttached=function(t){t._$attached||e.checkAndCallAttached(t)},e.pretendDetached=function(t){t._$attached&&e.checkAndCallDetached(t)},e.isAttached=function(e){return e._$attached},e.setSlotName=function(t,n){var o;if(t._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");var r=n?String(n):"",i=t._$slotName;if(i!==r){var a=null===i;t._$slotName=r,a&&(t._$subtreeSlotStart=t._$subtreeSlotEnd={value:t,prev:null,next:null}),1===t.getBackendMode()&&(null===(o=t._$backendElement)||void 0===o||o.setSlotName(r));var s=t.ownerShadowRoot;if(s)if(a){3===s.getSlotMode()&&(t._$slotValues=Object.create(null)),t.slotNodes=[];var l=t.parentNode;l&&e._$updateSubtreeSlotsInsertion(l,t._$subtreeSlotStart,t._$subtreeSlotEnd,t.parentIndex,!1)}else s.isConnected(t)&&s._$applySlotRename(t,r,i)}},e.getSlotName=function(e){var t=e._$slotName;return null===t?void 0:t},e.setInheritSlots=function(e){var t;if(!e._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");1===e.getBackendMode()&&(null===(t=e._$backendElement)||void 0===t||t.setInheritSlots()),e._$inheritSlots=!0},e.getInheritSlots=function(e){return e._$inheritSlots},e.setSlotElement=function(t,n){if(t._$slotElement!==n){t._$slotElement=n;var o=e._$getParentHostShadowRoot(t.parentNode);if(o){var r=St._$updateSubtreeSlotNodes(t.parentNode,[t],o,o,t.parentIndex),i=t.containingSlot;null==r||r.updateContainingSlot(),null==r||r.removeSlotNodes();var a=t.containingSlot;e.insertChildReassign(t.parentNode,t,i,a,t.parentIndex),null==r||r.insertSlotNodes()}}},e._$updateContainingSlot=function(e,t){var n;e.containingSlot=t,1===(null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getBackendMode())&&e.getBackendElement().setContainingSlot(t?t.getBackendElement():t)},e._$spliceSlotNodes=function(e,t,n,o){var r=e.slotNodes=e.slotNodes||[],i=t>=0&&t<r.length;if(null==o?void 0:o.length)if(i){for(var a=t;a<t+n;a+=1)r[a].slotIndex=void 0;for(r.splice.apply(r,ne([t,n],o,!1)),a=t;a<r.length;a+=1)r[a].slotIndex=a}else{var s=r.length;for(r.push.apply(r,o),a=s;a<r.length;a+=1)r[a].slotIndex=a}else if(n){for(a=t;a<t+n;a+=1)r[a].slotIndex=void 0;for(r.splice(t,n),a=t;a<r.length;a+=1)r[a].slotIndex=a}if(1===e._$nodeTreeContext.mode)if(null==o?void 0:o.length){var l=e._$nodeTreeContext.createFragment();for(a=0;a<o.length;a+=1)l.appendChild(o[a]._$backendElement);i?e._$backendElement.spliceBeforeSlotNodes(t,n,l):e._$backendElement.spliceAppendSlotNodes(l),l.release()}else n&&e._$backendElement.spliceRemoveSlotNodes(t,n)},e._$findSlotNodeInsertPosition=function(e,t,n){for(var o=e.ownerShadowRoot.getHostNode(),r=function(e){for(var t=0,n=e;n&&n!==o;)t+=1,n=n.parentNode;return t},i=r(t),a=function(e,t,n,o,r,i,s){if(e===o)return 0;if(e.parentNode===o.parentNode)return t-(-1===r?s:r);if(i<n){var l=e.parentNode;return a(l,l.parentIndex,n-1,o,r,i,s)}var c=n<i?e:e.parentNode,u=n<i?n:n-1,d=o.parentNode,p=i-1,h=a(c,c.parentIndex,u,d,d.parentIndex,p,s);return 0===h?-1:h},s=e.slotNodes,l=s.length-1;l>=0;l-=1){var c=s[l];if(a(c,c.parentIndex,r(c),t,t.parentIndex,i,n-.5)<0)break}return l+1},e.prototype.getComposedParent=function(){if(this instanceof St)return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e},e.prototype.getComposedChildren=function(){var e=[];return this.forEachComposedChild((function(t){e.push(t)})),e},e.prototype.forEachComposedChild=function(e){if(this._$inheritSlots)return!0;if(this instanceof $e&&!this._$external)return!1!==e(this.shadowRoot);if(null!==this._$slotName){var t=this.ownerShadowRoot;return!t||t.forEachNodeInSpecifiedSlot(this,e)}var n=function(t){for(var o=0;o<t.length;o+=1){var r=t[o];if(!1===e(r))return!1;if(r._$inheritSlots&&!n(r.childNodes))return!1}return!0};return n(this.childNodes)},e.prototype.forEachNonVirtualComposedChild=function(e){if(this._$inheritSlots)return!0;var t=function(t){return t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t)};if(this instanceof $e&&!this._$external)return t(this.shadowRoot);if(null!==this._$slotName){var n=this.ownerShadowRoot;return!n||n.forEachSlotContentInSpecifiedSlot(this,t)}var o=function(e){for(var n=0;n<e.length;n+=1){var r=e[n];if(!t(r))return!1;if(r._$inheritSlots&&!o(r.childNodes))return!1}return!0};return o(this.childNodes)},e.parseSelector=function(e){return new te(e)},e.prototype.querySelector=function(e){return(e instanceof te?e:new te(e)).query(this,!0)},e.prototype.querySelectorAll=function(e){return(e instanceof te?e:new te(e)).query(this,!1)},e.matchSelector=function(e,t){return(e instanceof te?e:new te(e)).testSelector(null,t)},e.prototype.matchSelector=function(e,t){return(e instanceof te?e:new te(e)).testSelector(this,t)},e.prototype.getBoundingClientRect=function(e){var t=this._$backendElement;if(t)if(3===this.getBackendMode()){var n=t.getBoundingClientRect();setTimeout((function(){e(n)}),0)}else t.getBoundingClientRect(e);else setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){var t=this._$backendElement;if(t)if(3===this.getBackendMode()){var n=t,o={scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight};setTimeout((function(){e(o)}),0)}else t.getScrollOffset(e);else setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.createIntersectionObserver=function(e,t,n,o){var r=this._$backendElement;return r?e&&!e._$backendElement?null:3===this.getBackendMode()?this._$nodeTreeContext.createIntersectionObserver(r,(null==e?void 0:e._$backendElement)||null,t,n,o):r.createIntersectionObserver((null==e?void 0:e._$backendElement)||null,t,n,o):null},e.prototype.getContext=function(e){var t=this._$backendElement;t&&(3===this.getBackendMode()?this._$nodeTreeContext.getContext(t,e):t.getContext(e))},e._$getParentHostShadowRoot=function(e){for(var t=e;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return t instanceof $e&&!t._$external?t.shadowRoot:null},e}(),ie=Symbol("method"),ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),se=function(e){function t(){throw new Error("Element cannot be constructed directly")}return ae(t,e),t.prototype._$initializeVirtual=function(e,t,n,o){if(this.is=String(e),1===n.mode){var r=t._$backendShadowRoot,i=o||(null==r?void 0:r.createVirtualNode(e))||null;this._$initialize(!0,i,t,n),null==i||i.associateValue(this)}else this._$initialize(!0,o,t,n)},t.create=function(e,n){var o=Object.create(t.prototype);return o._$initializeVirtual(e,n,n._$nodeTreeContext,null),o},t}(re);!function(e){e[e.Ancestor=0]="Ancestor",e[e.Descendant=1]="Descendant",e[e.ParentNonVirtualNode=2]="ParentNonVirtualNode",e[e.ChildNonVirtualNode=3]="ChildNonVirtualNode",e[e.ParentComponent=4]="ParentComponent",e[e.ChildComponent=5]="ChildComponent"}(oe||(oe={}));var le,ce=function(){function e(e,t){this._$comp=e;var n=new Array(6);if(t)for(var o=0;o<6;o+=1){var r=t.definitions[o];if(r){for(var i=new Array(r.length),a=0;a<r.length;a+=1)i[a]=null;n[o]=i}}this._$group=t,this._$sharedGroup=!0,this._$links=n}return e.prototype.add=function(e){if(this._$sharedGroup){this._$sharedGroup=!1;var t=this._$group;this._$group=t?{definitions:t.definitions.slice(),keyMap:Object.assign(Object.create(null),t.keyMap)}:{definitions:new Array(6),keyMap:Object.create(null)}}var n=Symbol(""),o=this._$group.definitions,r=this._$group.keyMap,i=e.type;o[i]?(r[n]=[i,o[i].length],o[i].push(e)):(r[n]=[i,0],o[i]=[e]);var a=this._$links;return void 0===a[i]?a[i]=[null]:a[i].push(null),n},e.prototype.triggerLinkEvent=function(e,t){var n,o,r=this._$comp,i=this._$links,a=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(a)for(var s=0;s<a.length;s+=1){var l=i[e],c=l[s],u=null,d=a[s],p=d.target;if(!t)for(var h=r;;){var f=h.parentNode;if(!f)break;if(!((h=f)instanceof se)){if(h instanceof $e){if(h.hasBehavior(p)){var v=h._$relation;if(v){var g;g=4===e?5:0===e?1:3;var _=null===(o=v._$group)||void 0===o?void 0:o.definitions[g];if(_){for(var $=0;$<_.length;$+=1){var m=_[$];if(m.target&&this._$comp.hasBehavior(m.target)){u={target:h,def:m};break}}if(u)break}}}if(4===e)break}if(2===e)break}}if(l[s]=u,c){var y=c.target,b=c.def;u&&c.target===u.target&&c.def===u.def?(b.linkChanged&&ct("Relation Link Changed Callback",b.linkChanged,y.getMethodCaller(),[r.getMethodCaller()],y),d.linkChanged&&ct("Relation Link Changed Callback",d.linkChanged,r.getMethodCaller(),[y.getMethodCaller()],r)):(b.unlinked&&ct("Relation Unlinked Callback",b.unlinked,y.getMethodCaller(),[r.getMethodCaller()],y),d.unlinked&&ct("Relation Unlinked Callback",d.unlinked,r.getMethodCaller(),[y.getMethodCaller()],r))}if(u){var S=u.target,C=u.def;c&&c.target===u.target&&c.def===u.def||(C.linked&&ct("Relation Linked Callback",C.linked,S.getMethodCaller(),[r.getMethodCaller()],S),d.linked&&ct("Relation Linked Callback",d.linked,r.getMethodCaller(),[S.getMethodCaller()],r))}t||u||!d.linkFailed||ct("Relation Link Failed Callback",d.linkFailed,r.getMethodCaller(),[],r)}},e.prototype.getLinkedTargets=function(e){var t,n,o,r,i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return rt('no relation "'.concat(String(e),'" found.')),[];var a=i[0],s=i[1];if(4===a||2===a||0===a){var l=null===(n=this._$links[a])||void 0===n?void 0:n[s];return l?[l.target]:[]}var c=[],u=this._$comp,d=null===(r=null===(o=this._$group)||void 0===o?void 0:o.definitions[a])||void 0===r?void 0:r[s],p=function(e){for(var t=e.childNodes,n=0;n<t.length;n+=1){var o=t[n];if(o instanceof re)if(o instanceof se)p(o);else if(o instanceof $e){if(o._$relation){var r;if(r=5===a?o._$relation._$links[4]:1===a?o._$relation._$links[0]:o._$relation._$links[2])for(var i=0;i<r.length;i+=1){var s=r[i];if(s&&s.target===u&&s.def===d){c.push(o);break}}}1===a&&p(o)}else 5!==a&&1!==a||p(o)}};return p(this._$comp),c},e}(),ue=function(){function e(e,t){this.ownerSpace=e,this._$trans=t}return e.prototype._$implement=function(e){var t;return(null===(t=this._$trans)||void 0===t?void 0:t.call(this,e))||e},e}(),de=function(){function e(){this._$traits=new WeakMap}return e.prototype.implement=function(e,t){var n=e._$implement(t);this._$traits.set(e,n)},e.prototype.get=function(e){return this._$traits.get(e)},e}(),pe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),he=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},fe=function(e,t,n,o){var r=t.ownerSpace,i=null==n?void 0:n._$behavior._$using,a=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();var s,l=e.behavior,c=l._$generics;if(c){var u=l._$genericDefaults;s=Object.create(null);for(var d=0;d<c.length;d+=1){var p=c[d];if(o&&Object.prototype.hasOwnProperty.call(o,p)){var h=o[p];if("string"==typeof h)if(null==i?void 0:i[h])s[p]=i[h];else if(a&&a[h])s[p]=a[h];else{var f=r.getGlobalUsingComponent(h);if("string"==typeof f)s[p]=f;else if(f)s[p]={final:f,source:t,placeholder:null,waiting:null};else{if(rt('Generic "'.concat(p,'" value "').concat(h,'" is not valid (on component "').concat(e.is,'").')),!(v=r.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(e.is,'")'));s[p]={final:v,source:t,placeholder:null,waiting:null}}}else s[p]=h}else{var v;if(!(v=u[p]||r.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(e.is,'")'));s[p]="string"==typeof v?v:{final:v,source:t,placeholder:null,waiting:null}}}}else s=null;return s},ve=function(e,t,n,o){var r,i=n._$using[e]||o&&o[e],a=null;if(i&&("string"==typeof i?a=i:null===i.placeholder?a=i.final:rt('Placeholder on generic implementation is not valid (on component "'.concat(n.is,'")'))),a)return a;var s=null!==(r=t.getGlobalUsingComponent(e))&&void 0!==r?r:t.getDefaultComponent();if(!s)throw new Error('Cannot find default component for placeholder target "'.concat(e,'" (on component "').concat(n.is,'")'));return s},ge=function(){function e(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=nt(e._$options,e.ownerSpace.getComponentOptions());var t=this._$options.templateEngine;this._$templateEngine=t}return e.prototype.general=function(){return this},e.prototype.getComponentOptions=function(){return this._$options},e.prototype.getComponentDependencies=function(){return this.behavior.getComponentDependencies()},e.prototype.updateTemplate=function(e){var t;this.behavior._$updateTemplate(e),(null===(t=this._$detail)||void 0===t?void 0:t.template.updateTemplate)?this._$detail.template.updateTemplate(this.behavior):rt('The template engine of component "'.concat(this.is,'" does not support template update'))},e.prototype.isPrepared=function(){return!!this._$detail},e.prototype.prepare=function(){if(!this._$detail){this.behavior.prepare();var e=this.behavior,t=this._$options,n={};if(t.writeFieldsToNode){for(var o=Object.keys(e._$propertyMap),r=function(e){var t=o[e];n[t]={enumerable:!0,get:function(){return this._$dataGroup.data[t]},set:function(e){var n=this._$dataGroup;n.replaceDataOnPath([t],e),n.applyDataUpdates()}}},i=0;i<o.length;i+=1)r(i);var a=Object.keys(e._$methodMap);for(i=0;i<a.length;i+=1){var s=a[i];n[s]={enumerable:!0,value:e._$methodMap[s]}}}var l=function(){};n.constructor={value:l,writable:!0};var c=l.prototype=Object.create($e.prototype,n);c._$behavior=e,c._$definition=this,c._$methodMap=e._$methodMap;var u=e._$generateObserverTree();c._$lifetimeFuncs=e._$getAllLifetimeFuncs(),c._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();var d=function(e){if(void 0===e)return null;for(var t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,o=t.keyMap,r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a],l=s.type;n[l]?(o[a]=[l,n[l].length],n[l].push(s)):(o[a]=[l,0],n[l]=[s])}return t}(e._$relationMap),p=V(t.dataDeepCopy),h=V(t.propertyPassingDeepCopy),f=this._$templateEngine.create(e,t);this._$detail={proto:c,template:f,dataGroupObserverTree:u,dataDeepCopy:p,propertyPassingDeepCopy:h,relationDefinitionGroup:d}}},e}(),_e=1,$e=function(e){function t(){throw new Error("Element cannot be constructed directly")}return pe(t,e),t.prototype.general=function(){return this},t.prototype.asInstanceOf=function(e){return this._$behavior!==e.behavior?null:this},t.register=function(e,t){return(t||Qe()).defineComponent(e)},t._$tagMethod=function(e){var t=e;return t[ie]=!0,t},t._$isTaggedMethod=function(e){return"function"==typeof e&&!!e[ie]},t._$advancedCreate=function(e,n,o,r,i,a,s){var l,c;n._$detail||n.prepare();var u=n._$detail,d=u.proto,p=u.template,h=u.dataDeepCopy,f=u.propertyPassingDeepCopy,v=u.relationDefinitionGroup,g=n._$detail.dataGroupObserverTree,_=n._$options,$=n.behavior,m=o?o._$nodeTreeContext:r||tt.backendContext||et(),y=_.externalComponent,b=_.propertyEarlyInit,S=tt.writeExtraInfoToAttr,C=_.virtualHost,w=Object.create(d);w._$genericImpls=i,w._$placeholderHandler=a,w._$external=y,w.tagName=e,w._$methodCaller=w;var N=null;if(o)if(C||3!==m.mode)if(C||2!==m.mode){if(1===m.mode){var k=o._$backendShadowRoot;N=(null==k?void 0:k.createComponent(e))||null}}else N=o._$nodeTreeContext.createElement(_.hostNodeTagName,e);else N=o._$nodeTreeContext.document.createElement(e);else if(C||3!==m.mode)if(C||2!==m.mode){if(1===m.mode){var O=m.getRootNode();if(!O)throw new Error("Failed getting backend shadow tree");N=O.createComponent(e)||null}}else N=m.createElement(_.hostNodeTagName,e)||null;else N=m.document.createElement(e);w._$initialize(C,N,o,m);var x={};if($._$externalClasses)for(var A=$._$externalClasses,M=0;M<A.length;M+=1)x[A[M]]=null;if(w.classList=new E(w,x),N){var D=o?o.getHostNode()._$definition._$options.styleScope:_.styleScope;if(D&&3!==m.mode&&N.setStyleScope(D,_.styleScope),o&&S){var I=null===(l=o.getHostNode()._$behavior.ownerSpace)||void 0===l?void 0:l.styleScopeManager.queryName(D);I&&N.setAttribute("exparser:info-class-prefix","".concat(I,"--"))}}if(N&&(3!==m.mode?N.associateValue(w):m.associateValue(N,w)),S&&N){var R=_e;_e+=1,w._$componentInstanceId=R,N.setAttribute("exparser:info-component-id",R)}w._$idPrefix=_.idPrefixGenerator?_.idPrefixGenerator.call(w):"";var B,P=$._$staticData,j=$._$data;if(void 0===P)if(1===j.length)B=(F=j[0])();else for(B={},M=0;M<j.length;M+=1){var F=j[M];Object.assign(B,F())}else for(B=T(P),M=0;M<j.length;M+=1)F=j[M],Object.assign(B,F());var U=w._$relation=new ce(w,v);w._$traitGroup=new de;var G=$._$traitBehaviors;if(void 0!==G)for(M=0;M<G.length;M+=1){var W=G[M],V=W.traitBehavior,z=W.impl;w._$traitGroup.implement(V,z)}if($._$methodCallerInit){var q=$._$methodCallerInit.call(w);w._$methodCaller=q}var X=!1;if($._$init.length>0){var K=!0,Y=!0,Z=!0,Q=!0,J={self:q=w.getMethodCaller(),data:B,setData:w.setData.bind(w),implement:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");w._$traitGroup.implement(e,t)},relation:function(e){if(X)throw new Error("Cannot execute init-time functions after initialization");var t,n=e.target,o=Ee($.ownerSpace,$.is,"undefined",e);return t=o?U.add(o):Symbol("invalid"),{list:function(){return U.getLinkedTargets(t).map((function(e){return e.getMethodCaller()}))},listAsTrait:n instanceof ue?function(){return U.getLinkedTargets(t).map((function(e){return e.traitBehavior(n)}))}:void 0}},observer:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");K&&(K=!1,g=g.cloneSub()),g.addObserver(t,L(e))},lifetime:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");Y&&(Y=!1,w._$lifetimeFuncs=$._$getAllLifetimeFuncs());var n=w._$lifetimeFuncs;n[e]?n[e].add(t):(n[e]=new ot).add(t)},pageLifetime:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");Z&&(Z=!1,w._$pageLifetimeFuncs=$._$getAllPageLifetimeFuncs());var n=w._$pageLifetimeFuncs;n[e]?n[e].add(t):(n[e]=new ot).add(t)},method:function(e){return t._$tagMethod(e)},listener:function(e){return t._$tagMethod(e)}},ee=$._$init;for(M=0;M<ee.length;M+=1){var te=ee[M],ne=ct("Component Init",te,q,[J],void 0);if(ne)for(var oe=Object.keys(ne),re=0;re<oe.length;re+=1){var ie=oe[re],ae=ne[ie];t._$isTaggedMethod(ae)&&(Q&&(Q=!1,w._$methodMap=Object.create(w._$methodMap)),w._$methodMap[ie]=ae,_.writeFieldsToNode&&(w[ie]=ae))}}}X=!0;var se=p.createInstance(w),le=se.shadowRoot;w.shadowRoot=le;var pe=new H(w,B,_.pureDataPattern||null,h,f,_.reflectToAttributes,g);w._$dataGroup=pe,b&&void 0!==s&&s(w),se.initValues(pe.innerData||pe.data),w._$tmplInst=se,pe.setUpdateListener(se.updateValues.bind(se));var he=$._$listeners;if(void 0!==he){var fe=function(e){var t=he[e],n=t.id,o=t.ev,r=t.listener;if("this"===n)w.addListener(o,(function(e){return r.call(w._$methodCaller,e)}));else if(y)a=le,(i=n?a.getIdMap()[n]:a.root)&&a.setListener(i,o,(function(e){return r.call(w._$methodCaller,e)}));else{var i,a=le;(i=n?a.getElementById(n):a)&&i.addListener(o,(function(e){return r.call(w._$methodCaller,e)}))}};for(M=0;M<he.length;M+=1)fe(M)}return null===(c=w._$lifetimeFuncs.created)||void 0===c||c.call(w._$methodCaller,[],w),b||void 0===s||s(w),w},t.createWithGenericsAndContext=function(e,n,o,r,i){var a=function(e){var t;return o&&(t=Object.create(null),Object.entries(o).forEach((function(n){var o=n[0],r=n[1];t[o]={final:r,source:e.behavior,placeholder:null,waiting:null}}))),fe(e,e.behavior,void 0,t)};if(n)return t._$advancedCreate(String(e),n,null,r,a(n),void 0,i);if(e instanceof ge)return t._$advancedCreate(e.is,e,null,r,a(e),void 0);var s=Qe().getComponentByUrl(e,"");return t._$advancedCreate(e,s,null,r,a(s),void 0)},t.createWithGenerics=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,o,null,r)},t.createWithContext=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,null,o,r)},t.create=function(e,n,o){return t.createWithGenericsAndContext(e,n,null,null,o)},Object.defineProperty(t.prototype,"is",{get:function(){return this._$definition.is},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._$dataGroup.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._$dataGroup.data},set:function(e){var t=this._$dataGroup;Object.entries(e).forEach((function(e){var n=e[0],o=e[1];return t.replaceDataOnPath([n],o)})),t.applyDataUpdates()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$",{get:function(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()},enumerable:!1,configurable:!0}),t.prototype.getShadowRoot=function(){return this._$external?null:this.shadowRoot},t.prototype.applyTemplateUpdates=function(){var e;if(null===(e=this._$tmplInst)||void 0===e?void 0:e.updateTemplate){var t=this._$dataGroup;this._$tmplInst.updateTemplate(this._$definition._$detail.template,t.innerData||t.data)}else rt('The template engine of component "'.concat(this.is,'" does not support template update'))},t.listProperties=function(e){return Object.keys(e._$behavior._$propertyMap)},t.hasProperty=function(e,t){return!!e._$behavior._$propertyMap[t]},t.getMethodsFromDef=function(e){return e.behavior._$methodMap},t.getMethod=function(e,t){if(e._$definition._$options.useMethodCallerListeners){var n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]},t.prototype.callMethod=function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r=t.getMethod(this,e);return null==r?void 0:r.call.apply(r,he([this],n,!1))},t.prototype.getComponentDefinition=function(){return this._$definition},t.prototype.getComponentOptions=function(){return this._$definition._$options},t.prototype.hasBehavior=function(e){return e instanceof ue?void 0!==this._$traitGroup.get(e):this._$behavior.hasBehavior(e)},t.prototype.getRootBehavior=function(){return this._$behavior},t.prototype.traitBehavior=function(e){return this._$traitGroup.get(e)},t.prototype.setMethodCaller=function(e){this._$methodCaller=e},t.prototype.getMethodCaller=function(){return this._$methodCaller},t.prototype.triggerLifetime=function(e,t){var n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t)},t.prototype.triggerLifeTime=function(e,t){return this.triggerLifetime(e,t)},t.prototype.triggerPageLifetime=function(e,n){var o=function(r){if(r instanceof t){if(r._$pageLifetimeFuncs){var i=r._$pageLifetimeFuncs[e];i&&i.call(r._$methodCaller,n)}r._$external||o(r.shadowRoot)}for(var a=r.childNodes,s=0;s<a.length;s+=1){var l=a[s];l instanceof re&&o(l)}};o(this)},t.prototype.triggerPageLifeTime=function(e,t){return this.triggerPageLifetime(e,t)},t.prototype.getRelationNodes=function(e){var t;return(null===(t=this._$relation)||void 0===t?void 0:t.getLinkedTargets(e))||[]},t.prototype.hasExternalClass=function(e){return this.classList._$hasAlias(e)},t.prototype.setExternalClass=function(e,t){var n=this.classList;n._$setAlias(e,t),n._$spreadAliasUpdate()},t.prototype.scheduleExternalClassChange=function(e,t){this.classList._$setAlias(e,t)},t.prototype.applyExternalClassChanges=function(){this.classList._$spreadAliasUpdate()},t.prototype.triggerWorkletChangeLifetime=function(e,t){this.triggerLifetime("workletChange",[e,t])},t.prototype.isInnerDataExcluded=function(e){var t;return(null===(t=this._$definition._$options.pureDataPattern)||void 0===t?void 0:t.test(e))||!1},t.getInnerData=function(e){return e._$dataGroup.innerData},t.getDataProxy=function(e){return e._$dataGroup},t.replaceWholeData=function(e,t){e._$dataGroup.replaceWholeData(t)},t.prototype.replaceDataOnPath=function(e,t){var n=this._$dataGroup;if(void 0===n)throw new Error("Cannot update data before component created");n.replaceDataOnPath(e,t)},t.prototype.spliceArrayDataOnPath=function(e,t,n,o){var r=this._$dataGroup;if(void 0===r)throw new Error("Cannot update data before component created");r.spliceArrayDataOnPath(e,t,n,o)},t.prototype.hasPendingChanges=function(){var e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0},t.prototype.applyDataUpdates=function(){var e=this._$dataGroup;if(void 0===e)throw new Error("Cannot update data before component created");e.applyDataUpdates()},t.prototype.groupUpdates=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");var n=e();return t.applyDataUpdates(),n},t.prototype.updateData=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");if("object"==typeof e&&null!==e)for(var n=Object.keys(e),o=0;o<n.length;o+=1){var r=n[o],i=M(r);i&&t.replaceDataOnPath(i,e[r])}},t.prototype.setData=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");if("object"==typeof e&&null!==e)for(var n=Object.keys(e),o=0;o<n.length;o+=1){var r=n[o],i=M(r);i&&t.replaceDataOnPath(i,e[r])}t.applyDataUpdates()},t}(re),me=function(){return me=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},me.apply(this,arguments)};!function(e){e.Invalid="invalid",e.Any="any",e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e.Function="function"}(le||(le={}));var ye,be=function(e,t){for(var n=Object.keys(t),o=0;o<n.length;o+=1){var r=n[o];if(Object.prototype.hasOwnProperty.call(e,r))if("_"===r[0]&&rt('data field "'.concat(r,'" from different behaviors is overriding or merging.')),"object"!=typeof e[r]||"object"!=typeof t[r]||null===t[r]||Array.isArray(t[r]))e[r]=t[r];else{if(Array.isArray(e[r]))e[r]=e[r].slice();else{for(var i=e[r],a={},s=Object.keys(i),l=0;l<s.length;l+=1){var c=s[l];a[c]=i[c]}e[r]=a}be(e[r],t[r])}else e[r]=t[r]}},Se=function(e){return"string"===e||e===String?"string":"number"===e||e===Number?"number":"boolean"===e||e===Boolean?"boolean":"object"===e||e===Object?"object":"array"===e||e===Array?"array":"function"===e||e===Function?"function":"any"===e||null==e?"any":"invalid"},Ce=function(e,t,n){var o=n.type,r=n.default,i=n.optionalTypes;if(i)for(var a=0;a<i.length;a+=1)if(we(i[a],e))return e;return"string"===o?null==e?(rt('property "'.concat(t,'" received type-incompatible value: expected <String> but get null value. Used default value instead.')),void 0===r?"":r()):("object"==typeof e&&rt('property "'.concat(t,'" received type-incompatible value: expected <String> but got object-typed value. Force converted.')),String(e)):"number"===o?isFinite(e)?Number(e):(rt('property "'.concat(t,"number"==typeof e?'" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.':'" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.')),void 0===r?0:r()):"boolean"===o?!!e:"array"===o?Array.isArray(e)?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.')),void 0===r?[]:r()):"object"===o?"object"==typeof e?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.')),void 0===r?null:r()):"function"===o?"function"==typeof e?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.')),void 0===r?function(){}:r()):void 0===e?void 0===r?null:r():e},we=function(e,t){if("string"===e){if("string"!=typeof t)return!1}else if("number"===e){if(!Number.isFinite(t))return!1}else if("boolean"===e){if("boolean"!=typeof t)return!1}else if("object"===e){if("object"!=typeof t||Array.isArray(t))return!1}else if("array"===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if("function"===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0},Ee=function(e,t,n,o){var r,i=function(e){return"function"==typeof e?e:(void 0!==e&&rt('the "'.concat(n,'" relation listener is not a function (when preparing behavior "').concat(t,'").')),null)};if("parent"===o.type)r=4;else if("child"===o.type)r=5;else if("parent-common-node"===o.type)r=2;else if("child-common-node"===o.type)r=3;else if("ancestor"===o.type)r=0;else{if("descendant"!==o.type){var a=o.type;return rt('the "'.concat(n,'" relation has an invalid relation type "').concat(a,'" (when preparing behavior "').concat(t,'").')),null}r=1}var s=null;if(o.target instanceof ge)s=o.target.behavior;else if(o.target instanceof ke||o.target instanceof ue)s=o.target;else{var l=String(o.target||n),c=e.getComponentByUrlWithoutDefault(l,t);if(c)s=c.behavior;else{var u=e.getGlobalUsingComponent(l);"object"==typeof u&&null!==u&&(s=u.behavior)}}return s?{target:s,type:r,linked:i(o.linked),linkChanged:i(o.linkChanged),unlinked:i(o.unlinked),linkFailed:i(o.linkFailed)}:(rt('the target of relation "'.concat(n,'" is not a valid behavior or component (when preparing behavior "').concat(t,'").')),null)},Ne=function(){function e(e,t){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this._$is=e,this._$ownerSpace=t}return e.prototype.methodCallerInit=function(e){return this._$methodCallerInit=e,this},e.prototype.behavior=function(e){return this._$behaviors.push(e),e._$chainingFilter?e._$chainingFilter(this):this},e.prototype.chainingFilter=function(e){return this._$chainingFilter=e,this},e.prototype.options=function(e){var t=this._$options;return this._$options=t?me(me({},t),e):e,this},e.prototype.implement=function(e,t){return this._$traitBehaviors.push({traitBehavior:e,impl:t}),this},e.prototype.template=function(e){return this._$template=e,this},e.prototype.usingComponents=function(e){return this._$using?this._$using=me(me({},this._$using),e):this._$using=e,this},e.prototype.placeholders=function(e){return this._$placeholders?this._$placeholders=me(me({},this._$placeholders),e):this._$placeholders=e,this},e.prototype.generics=function(e){return this._$generics?this._$generics=me(me({},this._$generics),e):this._$generics=e,this},e.prototype.externalClasses=function(e){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(e):this._$externalClasses=e,this},e.prototype.data=function(e){return this._$data.push(e),this},e.prototype.staticData=function(e){return this._$staticData=e,this},e.prototype.property=function(e,t){return this._$properties||(this._$properties=[]),this._$properties.push({name:e,def:t}),this},e.prototype.methods=function(e){for(var t=Object.keys(e),n=0;n<t.length;n+=1){var o=t[n],r=e[o];this._$methods.push({name:o,func:r})}return this},e.prototype.observer=function(e,t,n){return void 0===n&&(n=!1),this._$observers||(this._$observers=[]),this._$observers.push({dataPaths:L(e),func:t,once:n}),this},e.prototype.lifetime=function(e,t,n){return void 0===n&&(n=!1),this._$lifetimes.push({name:e,func:t,once:n}),this},e.prototype.pageLifetime=function(e,t,n){return void 0===n&&(n=!1),this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:e,func:t,once:n}),this},e.prototype.relation=function(e,t){return this._$relations||(this._$relations=[]),this._$relations.push({name:e,rel:t}),this},e.prototype.init=function(e){return this._$init.push(e),this},e.prototype.definition=function(e){var t;e.behaviors&&(t=this._$behaviors).push.apply(t,e.behaviors),e.options&&this.options(e.options),e.template&&this.template(e.template),e.using&&this.usingComponents(e.using),e.placeholders&&this.placeholders(e.placeholders),e.generics&&this.generics(e.generics),e.externalClasses&&this.externalClasses(e.externalClasses);var n=e.data;void 0!==n&&("function"==typeof n?this._$data.push(n):this._$staticData=n);var o=e.properties;if(void 0!==o){this._$properties||(this._$properties=[]);for(var r=Object.keys(o),i=0;i<r.length;i+=1){var a=r[i],s=o[a];this._$properties.push({name:a,def:s})}}var l=e.methods;if(void 0!==l)for(r=Object.keys(l),i=0;i<r.length;i+=1){var c=r[i],u=l[c];this._$methods.push({name:c,func:u})}var d=e.observers;if(void 0!==d)if(this._$observers||(this._$observers=[]),Array.isArray(d))for(i=0;i<d.length;i+=1){var p=d[i],h=p.fields,f=p.observer;this._$observers.push({dataPaths:L(null!=h?h:"**"),func:f,once:!1})}else for(r=Object.keys(d),i=0;i<r.length;i+=1)f=d[h=r[i]],this._$observers.push({dataPaths:L(h),func:f,once:!1});var v=e.lifetimes;if(void 0===(null==v?void 0:v.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==v?void 0:v.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==v?void 0:v.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==v?void 0:v.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==v?void 0:v.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),v)for(r=Object.keys(v),i=0;i<r.length;i+=1){var g=r[i];u=v[g],this._$lifetimes.push({name:g,func:u,once:!0})}var _=e.pageLifetimes;if(_)for(this._$pageLifetimes||(this._$pageLifetimes=[]),r=Object.keys(_),i=0;i<r.length;i+=1){var $=r[i];u=_[$],this._$pageLifetimes.push({name:$,func:u,once:!0})}this._$listeners=e.listeners;var m=e.relations;if(m)for(this._$relations||(this._$relations=[]),r=Object.keys(m),i=0;i<r.length;i+=1){var y=r[i],b=m[y];this._$relations.push({name:y,rel:b})}return this},e.prototype.registerBehavior=function(){var e=this._$is,t=new ke(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t},e.prototype.registerComponent=function(){var e=this._$is,t=new ke(this),n=new ge(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n},e}(),ke=function(){function e(e){this._$unprepared=!0,this.is=e._$is||"",this.ownerSpace=e._$ownerSpace,this._$builder=e,this._$flatAncestors=new Set,this._$chainingFilter=e._$chainingFilter,this._$options=e._$options,this._$traitBehaviors=void 0,this._$template=e._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=e._$externalClasses,this._$staticData=void 0,this._$data=[],this._$propertyMap=Object.create(null),this._$methodMap=Object.create(null),this._$observers=[],this._$lifetimes=[],this._$pageLifetimes=void 0,this._$listeners=void 0,this._$relationMap=void 0,this._$init=[],this._$methodCallerInit=e._$methodCallerInit}return e.create=function(e,t){return new Ne(e.is,t||Qe()).definition(e).registerBehavior()},e.prototype.general=function(){return this},e.prototype.getComponentDependencies=function(e){var t=new Set,n=function(e){e._$unprepared&&e.prepare();for(var o=Object.keys(e._$using),r=0;r<o.length;r+=1){var i=o[r],a=e._$using[i];if("string"!=typeof a){var s=a.final;s&&!t.has(s)&&(t.add(s),n(s.behavior))}}};if(n(this.general()),e)for(var o=Object.values(e),r=0;r<o.length;r+=1){var i=o[r];"string"!=typeof i&&(t.has(i)||(t.add(i),n(i.behavior)))}return t},e.prepare=function(e){e.prepare()},e.prototype.prepare=function(){var t,n,o,r,i,a,s,l,c,u;if(this._$unprepared){this._$unprepared=!1;var d=this.is,p=this.ownerSpace,h=this._$builder,f=this._$flatAncestors;if(Array.isArray(h._$behaviors))for(var v=0;v<h._$behaviors.length;v+=1){var g=h._$behaviors[v],_=null;if(g instanceof e)_=g;else{var $=String(g);p&&(_=p.getBehaviorByUrl($,d)),_||rt('behavior "'.concat($,'" is not found (when preparing behavior "').concat(d,'").'))}if(_){_._$unprepared&&e.prepare(_);var m=_._$traitBehaviors;void 0!==m&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(t=this._$traitBehaviors).push.apply(t,m));var y=_._$staticData;y&&(this._$staticData||(this._$staticData={}),be(this._$staticData,y)),Object.assign(this._$methodMap,_._$methodMap),Object.assign(this._$propertyMap,_._$propertyMap),(n=this._$data).push.apply(n,_._$data);for(var b=_._$observers,S=0;S<b.length;S+=1)(k=b[S]).once&&this._$observers.indexOf(k)>=0||this._$observers.push(k);for(var C=_._$lifetimes,w=0;w<C.length;w+=1)(k=C[w]).once&&this._$lifetimes.indexOf(k)>=0||this._$lifetimes.push(k);var E=_._$pageLifetimes;if(void 0!==E)if(this._$pageLifetimes)for(var N=0;N<E.length;N+=1){var k;(k=E[N]).once&&this._$pageLifetimes.indexOf(k)>=0||this._$pageLifetimes.push(k)}else this._$pageLifetimes=E.slice();var O=_._$listeners;void 0!==O&&(this._$listeners||(this._$listeners=[]),(o=this._$listeners).push.apply(o,O));var x=_._$relationMap;void 0!==x&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,x)),(r=this._$init).push.apply(r,_._$init),_._$flatAncestors.forEach((function(e){f.add(e)}))}}var A=h._$traitBehaviors;if(void 0!==A&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(i=this._$traitBehaviors).push.apply(i,A)),"object"==typeof h._$using&&null!==h._$using){var M="object"==typeof h._$placeholders&&null!==h._$placeholders,L=Object.keys(h._$using),D=function(e){var t=L[e],n=h._$using[t],o=null;if(M&&(o=null!==(u=h._$placeholders[t])&&void 0!==u?u:null),n instanceof ge)I._$using[t]={final:n,source:I,placeholder:o,waiting:null};else if(p){var r=String(n),i=p.getComponentByUrlWithoutDefault(r,d);if(i)I._$using[t]={final:i,source:I,placeholder:null,waiting:null};else if(null!==o){var a={final:null,source:I,placeholder:o,waiting:null},s=p._$componentWaitingList(r,d);s&&(s.add((function(e){a.final=e,a.placeholder=null,a.waiting=null})),a.waiting=s),I._$using[t]=a}else{var l=p.getGlobalUsingComponent(r);I._$using[t]="string"==typeof l?l:{final:l,source:I,placeholder:null,waiting:null}}}else rt('cannot find component "'.concat(String(n),'" (when preparing behavior "').concat(d,'").'))},I=this;for(v=0;v<L.length;v+=1)D(v)}if("object"==typeof h._$generics&&null!==h._$generics){var R=this._$generics=[],B=Object.create(null);this._$genericDefaults=B;var P=Object.keys(h._$generics);for(v=0;v<P.length;v+=1){var j=P[v],F=h._$generics[j],U=null,G=!0===F||null==F?void 0:F.default;if(void 0!==G)if(G instanceof ge)U=G;else if(p){var W=String(G);U=p.getComponentByUrlWithoutDefault(W,d)||p.getGlobalUsingComponent(W)}else rt('cannot define generic "'.concat(j,'" without a default implementor (when preparing behavior "').concat(d,'").'));R.push(j),B[j]=U}}var V=h._$staticData;V&&(this._$staticData?be(this._$staticData,V):this._$staticData=V);var H=h._$methods;for(v=0;v<H.length;v+=1){var z=H[v],q=z.name,X=z.func;this._$methodMap[q]=X}var K=h._$properties;if(void 0!==K){var Y=[],Z=function(e){var t,n=K[e],o=n.name,r=n.def,i=function(e){return"string"===e||e===String?{type:"string",optionalTypes:null,value:"",default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"number"===e||e===Number?{type:"number",optionalTypes:null,value:0,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===e||e===Boolean?{type:"boolean",optionalTypes:null,value:!1,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===e||e===Object?{type:"object",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===e||e===Array?{type:"array",optionalTypes:null,value:[],default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"function"===e||e===Function?{type:"function",optionalTypes:null,value:function(){},default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"any"===e||null==e?{type:"any",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:null}(r);if(null!==i)t=i;else{var a=r,s=Se(a.type),l=null;Array.isArray(a.optionalTypes)&&(l=a.optionalTypes.map(Se)).length>0&&("invalid"!==s&&"any"!==s||(s=l[0])),"invalid"===s&&rt('the type of property "'.concat(o,'" is illegal (when preparing behavior "').concat(d,'").'));var c=a.value;void 0===a.value?c="string"===s?"":"number"===s?0:"boolean"!==s&&("array"===s?[]:null):void 0!==a.default&&rt('the initial value of property "'.concat(o,'" is not used when its default is provided (when preparing behavior "').concat(d,'").'));var u=void 0;"function"==typeof a.observer?u=a.observer:a.observer?u=Q._$methodMap[a.observer]||null:(u=null,void 0!==a.observer&&rt('the observer of property "'.concat(o,'" is not a function (when preparing behavior "').concat(d,'").')));var p=void 0;"function"==typeof a.comparer?p=a.comparer:(p=null,void 0!==a.comparer&&rt('the comparer of property "'.concat(o,'" is not a function (when preparing behavior "').concat(d,'").')));var h=!!a.reflectIdPrefix;t={type:s,optionalTypes:l,value:c,default:a.default,observer:u,comparer:p,reflectIdPrefix:h}}Q._$propertyMap[o]=t,Y.push({name:o,func:void 0===t.default?function(){return T(t.value)}:t.default})},Q=this;for(v=0;v<K.length;v+=1)Z(v);this._$data.push((function(){for(var e={},t=0;t<Y.length;t+=1){var n=Y[t],o=n.name,r=n.func;e[o]=r()}return e}))}(a=this._$data).push.apply(a,h._$data);var J=h._$observers;if(void 0!==J)for(v=0;v<J.length;v+=1){var ee=J[v],te=ee.dataPaths,ne=(X=ee.func,ee.once),oe="function"==typeof X?X:this._$methodMap[X];"function"==typeof oe?this._$observers.push({dataPaths:te,observer:oe,once:ne}):rt('the "'.concat(String(oe),'" observer is not a function (when preparing behavior "').concat(d,'").'))}var re=h._$lifetimes;(s=this._$lifetimes).push.apply(s,re);var ie=h._$pageLifetimes;ie&&(this._$pageLifetimes||(this._$pageLifetimes=[]),(l=this._$pageLifetimes).push.apply(l,ie));var ae=h._$listeners;if(void 0!==ae&&(L=Object.keys(ae)).length>0)for(this._$listeners=[],v=0;v<L.length;v+=1){var se=ae[j=L[v]],le="function"==typeof se?se:this._$methodMap[se];if(le){var ce=j.indexOf("."),ue=void 0,de=void 0;ce>=0?(ue=j.slice(0,ce),de=j.slice(ce+1)):(ue="",de=j),this._$listeners.push({id:ue,ev:de,listener:le})}else rt('the "'.concat(j,'" listener is not a function or a method name (when preparing behavior "').concat(d,'").'))}var pe=h._$relations;if(void 0!==pe)for(this._$relationMap||(this._$relationMap=Object.create(null)),v=0;v<pe.length;v+=1){var he=pe[v],fe=he.name,ve=he.rel;if(null!=ve){var _e=Ee(p,d,fe,ve);_e&&(this._$relationMap[fe]=_e)}}(c=this._$init).push.apply(c,h._$init),f.add(this)}},e.prototype.getTemplate=function(){return this._$template},e.prototype._$updateTemplate=function(e){this._$template=e},e.prototype.hasBehavior=function(t){if(this._$unprepared&&this.prepare(),t instanceof e)return this._$flatAncestors.has(t);if(this.ownerSpace){var n=this.ownerSpace.getBehaviorByUrl(t,this.is);return!!n&&this._$flatAncestors.has(n)}return!1},e.prototype.getMethods=function(){return this._$methodMap},e.prototype._$generateObserverTree=function(){for(var e=new j(this._$propertyMap),t=this._$observers,n=0;n<t.length;n+=1){var o=t[n],r=o.dataPaths,i=o.observer;e.addObserver(i,r)}return e},e.prototype._$getAllLifetimeFuncs=function(){for(var e=Object.create(null),t=this._$lifetimes,n=0;n<t.length;n+=1){var o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=new ot).add(i)}return e},e.prototype._$getAllPageLifetimeFuncs=function(){var e=Object.create(null),t=this._$pageLifetimes;if(!t)return e;for(var n=0;n<t.length;n+=1){var o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=new ot).add(i)}return e},e}(),Oe=function(e,t){var n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");for(var o=[],r=0;r<n.length;r+=1){var i=n[r];""!==i&&"."!==i&&(".."!==i?o.push(i):o.pop())}return o.join("/")},xe=function(e,t){var n=e.indexOf("://");if(n>0){var o=e.indexOf("/",n+3);return o>0?{domain:e.slice(0,o),absPath:Oe(e.slice(o+1),"")}:{domain:e.slice(0,n+3),absPath:Oe(e.slice(n+3),"")}}return{domain:null,absPath:Oe(e,t)}},Ae=function(){function e(e,t,n){this._$callbacks=[],this._$ownerSpace=e,this._$isPub=t,this._$alias=n}return e.prototype.add=function(e){this._$callbacks.push(e)},e.prototype.hintUsed=function(e){var t,n;null===(n=(t=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(t,this._$isPub,this._$alias,e)},e.prototype.remove=function(e){var t=this._$callbacks.indexOf(e);this._$callbacks.splice(t,1)},e.prototype.call=function(e){var t=this._$callbacks;this._$callbacks=[];for(var n=0;n<t.length;n+=1)(0,t[n])(e)},e}(),Me=function(){function e(e,t,n){this._$behaviorList=Object.create(null),this._$pubBehaviorList=Object.create(null),this._$list=Object.create(null),this._$pubList=Object.create(null),this._$using=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),this._$groupingListWaiting=null,this._$componentWaitingListener=null,t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=nt({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new w}return e.prototype.updateComponentOptions=function(e){this._$componentOptions=nt(e,this._$componentOptions)},e.prototype.getComponentOptions=function(){return this._$componentOptions},e.prototype.setGlobalUsingComponent=function(e,t){this._$using[e]=t},e.prototype.importSpace=function(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}},e.prototype.getComponentByUrl=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath,i=this.getComponent(r,!0,o);if(!i)throw new Error('There is no component "'.concat(r,'" in the space and no default component can be used'));return i},e.prototype.getComponentByUrlWithoutDefault=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath;return this.getComponent(r,!1,o)||null},e.prototype.getComponent=function(e,t,n){var o;if(void 0===t&&(t=!0),void 0===n&&(n=null),n){var r=this._$importedSpaces[n];if(r){var i=r.space;o=r.privateUse?i._$list:i._$pubList}}else o=this._$list;if(o){var a=o[e];if(a)return a}if(t)return this._$list[this._$defaultComponent]},e.prototype.getDefaultComponent=function(){return this._$list[this._$defaultComponent]||null},e.prototype.isDefaultComponent=function(e){return this._$list[this._$defaultComponent]===e},e.prototype.getGlobalUsingComponent=function(e){return this._$using[e]||null},e.prototype.getBehaviorByUrl=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath;return this._$getBehavior(r,o)||null},e.prototype._$getBehavior=function(e,t){var n;if(void 0===t&&(t=null),t){var o=this._$importedSpaces[t];if(o){var r=o.space;n=o.privateUse?r._$behaviorList:r._$pubBehaviorList}}else n=this._$behaviorList;if(n){var i=n[e];if(i)return i}},e.prototype.defineComponent=function(e){var t=e.is;return new Ne(t,this).definition(e).registerComponent()},e.prototype.defineBehavior=function(e){var t=e.is;return new Ne(t,this).definition(e).registerBehavior()},e.prototype.define=function(e){return new Ne(e,this)},e.prototype.defineWithMethodCaller=function(e){return new Ne(e,this)},e.prototype._$registerComponent=function(e,t){this._$list[e]=t,this._$behaviorList[e]=t.behavior;var n=this._$listWaiting[e];n&&(delete this._$listWaiting[e],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:t}):n.call(t))},e.prototype._$registerBehavior=function(e,t){this._$behaviorList[e]=t},e.prototype.startGroupRegister=function(){this._$groupingListWaiting=[]},e.prototype.endGroupRegister=function(){var e=this._$groupingListWaiting;if(e){this._$groupingListWaiting=null;for(var t=0;t<e.length;t+=1){var n=e[t],o=n.waiting,r=n.comp;o.call(r)}}},e.prototype.groupRegister=function(e){this.startGroupRegister();var t=ct("group register",e,this,[]);return this.endGroupRegister(),t},e.prototype.exportComponent=function(e,t){var n=this._$list[t];if(!n)throw new Error('There is no component "'.concat(t,'" for aliasing'));this._$pubList[e]=n;var o=this._$pubListWaiting[e];o&&(delete this._$pubListWaiting[e],o.call(n))},e.prototype.getExportedComponent=function(e){return this._$pubList[e]},e.prototype.getExportedBehavior=function(e){return this._$pubBehaviorList[e]},e.prototype.exportBehavior=function(e,t){var n=this._$behaviorList[t];if(!n)throw new Error('There is no behavior "'.concat(t,'" for aliasing'));this._$pubBehaviorList[e]=n},e.prototype._$componentWaitingList=function(e,t){var n,o,r,i=xe(e,t),a=i.domain,s=i.absPath;if(a){var l=this._$importedSpaces[a];if(!l)return null;if(o=l.space,r=!l.privateUse){if(o._$pubList[s])return null;n=o._$pubListWaiting}else{if(o._$list[s])return null;n=o._$listWaiting}}else{if(o=this,r=!1,this._$list[s])return null;n=this._$listWaiting}var c=n[s];return c||(n[s]=new Ae(o,r,s))},e.prototype.setComponentWaitingListener=function(e){this._$componentWaitingListener=e},e.prototype.createComponentByUrl=function(e,t,n,o){var r=this,i=t,a=null,s=i.indexOf("#");s>=0&&(i=i.slice(0,s));var l=i.indexOf("?");l>=0&&(a=i.slice(l+1),i=i.slice(0,l));var c=this.getComponentByUrl(i,""),u=null;return n&&(u=Object.create(null),Object.keys(n).forEach((function(e){var t=n[e],o=r.getComponentByUrl(t,"");u[e]=o}))),$e.createWithGenericsAndContext(e,c,u,o,(function(e){if(a){var t=!1;a.split("&").forEach((function(n){var o=n.indexOf("=");if(o>=0){var r=decodeURIComponent(n.slice(0,o)),i=decodeURIComponent(n.slice(o+1));e._$dataGroup.replaceProperty(r,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))},e.prototype.defineTraitBehavior=function(e){return new ue(this,e)},e}(),Le=function(){function e(e,t,n,o){this.keyName=e,this.updateKeys(t);for(var r=this.items,i=this.indexes,a=[],s=0;s<r.length;s+=1){var l=r[s],c=null===i?s:i[s];a.push(o(l,c))}n.insertChildren(a,-1)}return e.prototype.updateKeys=function(e){var t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){var o=Object.keys(e);t=new Array(o.length),n=new Array(o.length);for(var r=0;r<o.length;r+=1){var i=e[h=o[r]];t[r]=i,n[r]=h}}else if("string"==typeof e)for(rt("Use string as for-list is generally for testing. Each character is treated as an item."),t=new Array(e.length),n=null,r=0;r<e.length;r+=1)t[r]=e[r];else if("number"==typeof e)for(rt("Use number as for-list is generally for testing. The number is used as the repeated times of the item."),t=new Array(e),n=null,r=0;r<e;r+=1)t[r]=r;else rt("The for-list data is invalid. Use empty array instead."),t=[],n=null;this.items=t,this.indexes=n;var a,s=this.keyName,l=new Array(t.length),c=Object.create(null);if(null!==s){for(r=0;r<t.length;r+=1){i=t[r];var u="*this"===s?i:null==i?void 0:i[s],d=null!=u?String(u):"";l[r]=d,void 0!==c[d]?(a||(a=Object.create(null)),a[d]=[c[d],r],delete c[d]):(null==a?void 0:a[d])?a[d].push(r):c[d]=r}if(a){var p=Object.keys(a);for(rt('Some keys are not unique while list updates: "'.concat(p.join('", "'),'".')),r=0;r<p.length;r+=1)for(var h,f=a[h=p[r]],v=0,g=0;g<f.length;g+=1){for(var _=f[g];void 0!==c["".concat(h,"--").concat(v)];)v+=1;c[o="".concat(h,"--").concat(v)]=_,l[_]=o}}}this.rawKeys=l,this.keyMap=c,this.sharedKeyMap=a},e.prototype.diff=function(e,t,n,o,r){var i=this.rawKeys,a=this.keyMap,s=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);var c,u,d=this.rawKeys,p=this.sharedKeyMap,h=this.items,f=this.indexes,v=this.keyName;if(!0===t)u=!0,c=null===v;else if(void 0===t)u=t,c=!0;else if(null===v)u=!0,c=!0;else{var g=!1;if(Array.isArray(t))g=!0;else for(var _=Object.keys(t),$=0;$<_.length;$+=1)if(!0===(m=t[y=_[$]])||("*this"===v?m:null==m?void 0:m[v])){g=!0;break}if(g){for(u=new Array(d.length),$=0;$<d.length;$+=1){var m,y=d[$];void 0!==(null==s?void 0:s[y])||void 0!==(null==p?void 0:p[y])?u[$]=!0:void 0===(m=t[$])||(!0===m||("*this"===v?m:null==m?void 0:m[v])?u[$]=!0:u[$]=m)}c=!1}else u=t,c=!1}if(c){var b;for(b=!!Array.isArray(t)||t,$=0;$<i.length&&$<d.length;){var S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];r(S,C,!0===b||void 0===b?b:b[$],C!==w,n.childNodes[$]),$+=1}if($<i.length)n.removeChildren($,i.length-$);else if($<d.length){for(var E=[];$<d.length;$+=1)S=h[$],C=null===f?$:f[$],E.push(o(S,C));n.insertChildren(E,-1)}}else{var N=[],k=[],O=new Array(d.length),x=new Array(d.length),A=-1,M=-1;for($=0;$<d.length;$+=1){var L=d[$];if(i[A+1]!==L)if(void 0!==(w=a[L])){for(var D=0,T=N.length;D<T;){var I=Math.floor((D+T)/2);w<N[I]?T=I:D=I+1}N[T]=w,k[T]=$,O[$]=T>0?k[T-1]:-1,x[$]=w,A=w,M=T}else x[$]=-1;else A+=1,N[M+=1]=A,k[M]=$,O[$]=M>0?k[M-1]:-1,x[$]=A}var R=k.length;if(R!==d.length||R!==i.length){for(var B=R>0?k[R-1]:-1,P=R;-1!==B;)N[P-=1]=B,B=O[B];var j,F=N;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(j||(j={}));var U=new Array(i.length),G=new Array(d.length),W=F[P];for($=0;$<x.length;$+=1){var V=x[$];$!==F[P]?-1!==V?(U[V]=V>W?2:1,G[$]=n.childNodes[V]):(S=h[$],C=null===f?$:f[$],G[$]=o(S,C)):(W=V,P+=1,U[V]=0)}var H=0,z=0,q=0;P=0;do{for(var X=P<F.length?F[P]:G.length,K=P<F.length?x[X]:U.length;z<K;)if(void 0===U[z]){var Y=z;z+=1;for(var Z=1;z<K&&void 0===U[z];)z+=1,Z+=1;n.removeChildren(Y+H,Z),H-=Z}else 2===U[z]&&(H-=1),z+=1;for(;q<X;){var Q=G[q];if(-1===(V=x[q])){for(Y=q,q+=1,Z=1;q<X&&-1===x[q];)q+=1,Z+=1;n.insertChildren(G.slice(Y,Y+Z),K+H),H+=Z}else n.insertChildAt(Q,K+H),S=h[q],C=null===f?q:f[q],w=null===l?V:l[V],r(S,C,!0===u||void 0===u?u:u[q],C!==w,Q),2===U[V]&&(H+=1),q+=1}P<F.length&&(S=h[X],C=null===f?X:f[X],w=null===l?K:l[K],r(S,C,!0===u||void 0===u?u:u[X],C!==w,n.childNodes[K+H])),z=K+1,q=X+1,P+=1}while(P<=F.length)}else for($=0;$<i.length&&$<d.length;){S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];r(S,C,!0===u||void 0===u?u:u[$],C!==w,n.childNodes[$]),$+=1}}},e}(),De=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Te=function(e){return e},Ie=function(e){var t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Re=function(e){return null==e?"":String(e)},Be=function(){function e(e,t,n,o){this.bindingMapDisabled=!1,this.eventObjectFilter=Te,this.changePropFilter=Te,this.eventListenerFilter=Te,this.shadowRoot=e,this.procGen=t,this.disallowNativeNode=n,o&&(this.eventObjectFilter=o)}return e.prototype.create=function(e){var t=this.shadowRoot,n=(0,this.procGen)(this,!0,e,void 0);return this.handleChildrenCreationAndInsert(n.C,t,void 0,void 0),n.B},e.prototype.update=function(e,t){var n=this.shadowRoot,o=(0,this.procGen)(this,!1,e,t);this.handleChildrenUpdate(o.C,n,void 0,void 0)},e.prototype.bindingMapUpdate=function(e,t,n){if(this.bindingMapDisabled)return!1;var o=n[e];if(!o)return!1;for(var r=null,i=0;i<o.length;i+=1)(0,o[i])(t,(function(e){null!==r&&e!==r&&r instanceof $e&&r.hasPendingChanges()&&$e.getDataProxy(r).applyDataUpdates(!0),r=e}),(function(e,t){e.textContent=t}));var a=r;return null!==a&&a instanceof $e&&a.hasPendingChanges()&&$e.getDataProxy(a).applyDataUpdates(!0),!0},e.prototype.handleChildrenCreation=function(e,t,n){var o=this,r=[];return e(!0,(function(e,i){if(t&&""!==n){var a=o.createDynamicPlaceholder(t);r.push(a)}else{var s=o.shadowRoot.createTextNode(e);s.destroyBackendElementOnDetach(),t&&re.setSlotElement(s,t),i&&i(s),r.push(s)}}),(function(e,i,a,s,l,c){if(t&&n!==(l||"")){var u=o.createDynamicPlaceholder(t);r.push(u)}else{var d=o.createCommonElement(e,i,a,s,c);t?(re.setSlotElement(d,t),Ie(d).dynamicSlotNameMatched=!0):void 0!==l&&(d.slot=l),r.push(d)}}),(function(e,i){var a=o.shadowRoot.createVirtualNode("wx:if");a.destroyBackendElementOnDetach(),re.setInheritSlots(a),t&&re.setSlotElement(a,t),Ie(a).key=e,o.handleChildrenCreationAndInsert(i,a,t,n),r.push(a)}),(function(e,i,a,s,l){var c=o.shadowRoot,u=c.createVirtualNode("wx:for");u.destroyBackendElementOnDetach(),re.setInheritSlots(u),t&&re.setSlotElement(u,t),Ie(u).keyList=new Le(i,e,u,(function(e,r){var i=c.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),re.setInheritSlots(i),t&&re.setSlotElement(u,t),o.handleChildrenCreationAndInsert((function(t,n,o,i,a,c,u){l(!0,e,r,void 0,void 0,s?De(De([],s,!0),[r],!1):null,n,o,i,a,c,u)}),i,t,n),i})),r.push(u)}),(function(e,n){var i=o.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),re.setSlotName(i,Re(e)),t&&re.setSlotElement(i,t),n&&n(i),r.push(i)}),(function(e,i){if(void 0!==i)if(t)if(n===i)(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setSlotElement(a,t),Ie(a).dynamicSlotNameMatched=!0,o.handleChildrenCreationAndInsert(e,a,void 0,void 0),r.push(a);else{var a=o.createDynamicPlaceholder(t);r.push(a)}else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),a.slot=i,o.handleChildrenCreationAndInsert(e,a,void 0,void 0),r.push(a);else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setInheritSlots(a),t&&re.setSlotElement(a,t),o.handleChildrenCreationAndInsert(e,a,t,n),r.push(a)}),void 0,void 0),r},e.prototype.handleChildrenCreationAndInsert=function(e,t,n,o){var r=this.handleChildrenCreation(e,n,o);r.length&&t.insertChildren(r,-1)},e.prototype.handleChildrenUpdate=function(e,t,n,o){var r=this,i=0,a=n?n.slotNodes.filter((function(e){return e.parentNode===t})):t.childNodes;e(!1,(function(e){var t=a[i];i+=1,(!n||Ie(t).dynamicSlotNameMatched)&&void 0!==e&&(t.textContent=e)}),(function(e,s,l,c,u,d){var p=a[i];if(i+=1,n){var h=Ie(p);if(o!==(u||""))return void(h.dynamicSlotNameMatched&&(f=r.createDynamicPlaceholder(n),t.replaceChild(f,p)));if(!h.dynamicSlotNameMatched){var f=r.createCommonElement(e,s,l,c,d);return re.setSlotElement(f,n),Ie(f).dynamicSlotNameMatched=!0,void t.replaceChild(f,p)}}l(p,!1);var v=!1;if(p instanceof $e){var g=r.dynamicSlotUpdate(p,d,c);g&&(v=!0),p.hasPendingChanges()&&$e.getDataProxy(p).applyDataUpdates(!0),null==g||g.applySlotUpdates()}n||void 0!==u&&(p.slot=u),v||r.handleChildrenUpdate(c,p,void 0,void 0)}),(function(e,s){var l=a[i];if(i+=1,Ie(l).key===e)r.handleChildrenUpdate(s,l,n,o);else{var c=r.shadowRoot.createVirtualNode("wx:if");c.destroyBackendElementOnDetach(),re.setInheritSlots(c),n&&re.setSlotElement(c,n),Ie(c).key=e,r.handleChildrenCreationAndInsert(s,c,n,o),n?t.replaceChild(c,l):t.replaceChildAt(c,i-1)}}),(function(e,t,s,l,c){var u=a[i];i+=1,Ie(u).keyList.diff(e,s,u,(function(e,t){var i=r.shadowRoot.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),re.setInheritSlots(i),n&&re.setSlotElement(u,n),r.handleChildrenCreationAndInsert((function(n,o,r,i,a,s,u){c(!0,e,t,void 0,void 0,l?De(De([],l,!0),[t],!1):null,o,r,i,a,s,u)}),i,n,o),i}),(function(e,t,i,a,s){r.handleChildrenUpdate((function(n,o,r,s,u,d,p){c(!1,e,t,i,!!a||void 0,l?De(De([],l,!0),[t],!1):null,o,r,s,u,d,p)}),s,n,o)}))}),(function(e,t){var n=a[i];i+=1,void 0!==e&&re.setSlotName(n,Re(e)),t&&t(n),r.shadowRoot.applySlotValueUpdates(n)}),(function(e,s){var l=a[i];if(i+=1,void 0!==s)if(n){var c=Ie(l);if(o===s)c.dynamicSlotNameMatched?r.handleChildrenUpdate(e,l,void 0,void 0):((u=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setSlotElement(u,n),Ie(u).dynamicSlotNameMatched=!0,r.handleChildrenCreationAndInsert(e,u,void 0,void 0),t.replaceChild(u,l));else if(c.dynamicSlotNameMatched){var u=r.createDynamicPlaceholder(n);t.replaceChild(u,l)}}else l.slot=s,r.handleChildrenUpdate(e,l,void 0,void 0);else r.handleChildrenUpdate(e,l,n,o)}),void 0,void 0)},e.prototype.dynamicSlotUpdate=function(e,t,n){var o=this,r=e.getShadowRoot();return 3===(null==r?void 0:r.getSlotMode())?(r.setDynamicSlotHandler(t||[],(function(t){for(var r=[],i=function(e){var i=t[e],a=i.slot,s=i.name,l=i.slotValues,c=o.handleChildrenCreation((function(e,t,o,r,i,a,s){n(!0,t,o,r,i,a,s,l,void 0)}),a,s);r.push.apply(r,c)},a=0;a<t.length;a+=1)i(a);r.length&&e.insertChildren(r,-1)}),(function(t){if(t.length&&t[0].slotNodes.length){t.sort((function(e,t){return e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex}));for(var n=-1/0,o=-1/0,r=0;r<t.length;r+=1){var i=t[r].slotNodes,a=i[0].parentIndex;o===a||(n>=0&&e.removeChildren(n,o-n),n=a),o=a+i.length}n>=0&&e.removeChildren(n,o-n)}}),(function(t,r,i){var a=t._$slotName||"";o.handleChildrenUpdate((function(e,t,o,a,s,l,c){n(!1,t,o,a,s,l,c,r,i)}),e,t,a)})),r):null},e.prototype.createDynamicPlaceholder=function(e){var t=this.shadowRoot.createVirtualNode("virtual");return t.destroyBackendElementOnDetach(),re.setSlotElement(t,e),Ie(t).dynamicSlotNameMatched=!1,t},e.prototype.createCommonElement=function(e,t,n,o,r){var i,a=this,s=this.shadowRoot.checkComponentPlaceholder(e),l=!1,c=function(e){var t=e instanceof $e?a.dynamicSlotUpdate(e,r,o):null;t&&(l=!0),n(e,!0),e instanceof $e&&(e.hasPendingChanges()&&$e.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates())};if(this.disallowNativeNode||"boolean"==typeof s){var u=void 0;s&&(u=function(){var n,o=a.shadowRoot.createComponent(e,e,t,void 0,c);o.destroyBackendElementOnDetach();var r=o.getShadowRoot(),s=i instanceof $e?i.getShadowRoot():null,l=3===(null==s?void 0:s.getSlotMode());if(3===(null==r?void 0:r.getSlotMode())){if(!l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');null===(n=i.parentNode)||void 0===n||n.replaceChild(o,i)}else{if(l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');i.selfReplaceWith(o)}}),(i=this.shadowRoot.createComponent(e,e,t,u,c)).destroyBackendElementOnDetach()}else(i=this.shadowRoot.createComponentOrNativeNode(null!=s?s:e,t,c)).destroyBackendElementOnDetach();return l?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(o,i,void 0,void 0),i},e.prototype.s=function(e,t){e.slot=t},e.prototype.l=function(e,t,n){this.shadowRoot.replaceSlotValue(e,t,n)},e.prototype.i=function(e,t){e.id=t},e.prototype.c=function(e,t){e instanceof $e?(e.hasExternalClass("class")&&e.setExternalClass("class",Re(t)),e.class=Re(t)):e.class=Re(t)},e.prototype.y=function(e,t){e.setNodeStyle(Re(t),0)},e.prototype.d=function(e,t,n){e.setDataset(t,n)},e.prototype.m=function(e,t,n){e.setMark(t,n)},e.prototype.v=function(e,t,n,o,r,i,a){var s=this,l="function"==typeof n?this.eventListenerFilter(n):Re(n),c=function(t){var n,o=e.ownerShadowRoot.getHostNode(),r=o.getMethodCaller(),i="function"==typeof l?l:$e.getMethod(o,l);if("function"==typeof i){var a=s.eventObjectFilter(t);n=i.call(r,a)}return n},u={final:o,mutated:r,capture:i};if(a){var d=Ie(e);d.dynEvListeners||(d.dynEvListeners={});var p=d.dynEvListeners;p[t]&&e.removeListener(t,p[t],u),p[t]=c}l&&e.addListener(t,c,u)},e.prototype.r=function(e,t,n,o){var r;if(e instanceof $e){var i=$e.getDataProxy(e),a=t.replace(/-(.|$)/g,(function(e){return e[1]?e[1].toUpperCase():""}));if(i.replaceProperty(a,n)){o&&i.setModelBindingListener(a,(function(t){var n=e.ownerShadowRoot.getHostNode(),r=$e.getDataProxy(n);r.replaceDataOnPath(o,t),r.applyDataUpdates(!1)}));var s=Ie(e);if(null===(r=s.changeProp)||void 0===r?void 0:r[t]){var l=s.changeProp[t],c=l.oldValue;if(c!==n){l.oldValue=n;var u=e.ownerShadowRoot.getHostNode();l.listener.call(u.getMethodCaller(),n,c,u,e)}}}else e.hasExternalClass(t)?e.setExternalClass(t,Re(n)):a.startsWith("bind")?this.v(e,a.slice("bind".length),Re(n),!1,!1,!1,!0):a.startsWith("captureBind")?this.v(e,a.slice("captureBind".length),Re(n),!1,!1,!0,!0):a.startsWith("catch")?this.v(e,a.slice("catch".length),Re(n),!0,!1,!1,!0):a.startsWith("captureCatch")?this.v(e,a.slice("captureCatch".length),Re(n),!0,!1,!0,!0):a.startsWith("on")&&this.v(e,a.slice("on".length),Re(n),!1,!1,!1,!0)}else e instanceof $t&&(e.updateAttribute(t,n),o&&e.setModelBindingListener(t,(function(t){var n=e.ownerShadowRoot.getHostNode(),r=$e.getDataProxy(n);r.replaceDataOnPath(o,t),r.applyDataUpdates(!1)})))},e.prototype.wl=function(e,t,n){e instanceof $e&&e.triggerWorkletChangeLifetime(t,n)},e.prototype.p=function(e,t,n){if(e instanceof $e&&$e.hasProperty(e,t)){var o=Ie(e);o.changeProp||(o.changeProp=Object.create(null)),o.changeProp[t]={listener:this.changePropFilter(n),oldValue:e.data[t]}}},e.prototype.setFnFilter=function(e,t){this.changePropFilter=e,this.eventListenerFilter=t},e}(),Pe=function(){},je=function(){function e(e,t){this.shadowRoot=e,this.procGen=t}return e.prototype.create=function(e){var t=this.shadowRoot,n=(0,this.procGen)(this,!0,e,void 0);return this.handleChildrenCreation(n.C,t.shadowRootElement),n.B},e.prototype.bindingMapUpdate=function(e,t,n){var o=n[e];if(void 0!==o)for(var r=0;r<o.length;r+=1)(0,o[r])(t,(function(){}),(function(e,t){e.textContent=t}))},e.prototype.handleChildrenCreation=function(e,t){var n=this,o=!0,r=!1,i=function(){o=!1,r=!1;var e=document.createElement("virtual");t.appendChild(e),n.shadowRoot.slot=e};e(!0,(function(e,n){r?i():o=!1;var a=document.createTextNode(e||"");n&&n(a),t.appendChild(a)}),(function(e,a,s,l){r?i():o=!1;var c=document.createElement(e);s(c,!0),n.handleChildrenCreation(l,c),t.appendChild(c)}),Pe,Pe,(function(){o?(r=!0,n.shadowRoot.slot=t):i()}),(function(e){r?i():o=!1;var a=document.createElement("virtual");n.handleChildrenCreation(e,a),t.appendChild(a)}))},e.prototype.s=function(){},e.prototype.i=function(e,t){this.shadowRoot.idMap[t]=e},e.prototype.c=function(e,t){e.setAttribute("class",t)},e.prototype.y=function(e,t){e.setAttribute("style",t)},e.prototype.d=function(e,t,n){e.dataset[t]=Re(n)},e.prototype.m=function(){},e.prototype.v=function(e,t,n,o){var r=this;this.shadowRoot.setListener(e,t,(function(e){var t=r.shadowRoot.template.methods[n],i=null==t?void 0:t(e);return!o&&i}))},e.prototype.r=function(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Re(n))},e.prototype.p=function(){},e.prototype.setFnFilter=function(){},e}(),Fe=function(){return{C:function(e,t,n,o,r,i){i("")},B:Object.create(null)}},Ue=function(){return Fe},Ge=function(){function e(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error("Component template of ".concat(e.is,' must be a valid compiled template (or "null" for default template).'));var t=e._$template||{content:Ue};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content},this.updateMode="",this.methods=e._$methodMap}return e.prototype.createInstance=function(e){return new We(this,e)},e}(),We=function(){function e(e,t){if(3!==t.getBackendMode())throw new Error("Component template of ".concat(t.is," cannot be initialized since external rendering is only supported in Domlike backend currently."));var n=t.getBackendElement();if(!n)throw new Error("Component template of ".concat(t.is," cannot be initialized as external components since no suitable backend element found."));this.comp=t,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=e;var o=e.genObjectGroupEnv.group("")||Ue();this.procGenWrapper=new je(this,o),this.idMap=Object.create(null),this.listeners=[]}return e.prototype.initValues=function(e){if(this.bindingMapGen=this.procGenWrapper.create(e),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");var t=this.shadowRootElement;if(this.slot===t&&t.childNodes.length>0){var n=document.createElement("virtual");t.appendChild(n),this.slot=n}},e.prototype.getIdMap=function(){return this.idMap},e.prototype.updateValues=function(e,t){for(var n=this.bindingMapGen,o=0;o<t.length;o+=1){var r=t[o][0];this.procGenWrapper.bindingMapUpdate(r[0],e,n)}},e.prototype.setListener=function(e,t,n){var o,r=e;r._$wxTmplEv?r._$wxTmplEv[t]=n:r._$wxTmplEv=((o={})[t]=n,o)},e.prototype.handleEvent=function(e,t){for(var n,o=e,r=o,i=this.shadowRootElement,a=t.type,s=t.bubbles;;){var l=t.wrapShadowedEvent(o,null,r),c=null===(n=r._$wxTmplEv)||void 0===n?void 0:n[a];if(c&&!1===c.call(r,l)&&(t.preventDefault(),t.stopPropagation()),!s||t.propagationStopped())break;if(r===i)break;var u=r.parentNode;if(!u)break;r=u}},e}(),Ve=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},He=function(){return{C:function(e,t,n,o,r,i){i("")},B:Object.create(null)}},ze=function(){return He};!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(ye||(ye={}));var qe,Xe=function(){function e(){}return e.prototype.create=function(e,t){return t.externalComponent?new Ge(e):new Ke(e)},e}(),Ke=function(){function e(e){this.updateTemplate(e)}return e.prototype.updateTemplate=function(e){var t=e._$template;if("object"!=typeof t&&void 0!==t)throw new Error("Component template of ".concat(e.is,' must be a valid compiled template (or "null" for default template).'));var n=t||{content:ze};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.disallowNativeNode=n.disallowNativeNode||!1,this.eventObjectFilter=n.eventObjectFilter},e.prototype.createInstance=function(e){return new Ye(this,e)},e}(),Ye=function(){function e(e,t){this.comp=t,this.shadowRoot=St.createShadowRoot(t),this.shadowRoot.destroyBackendElementOnDetach(),this._$applyTemplate(e)}return e.prototype.updateTemplate=function(e,t){this._$applyTemplate(e),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(t)},e.prototype._$applyTemplate=function(e){var t=e.genObjectGroupEnv.group("")||ze("");"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Be(this.shadowRoot,t,e.disallowNativeNode,e.eventObjectFilter),this.bindingMapGen=void 0},e.prototype.initValues=function(e){return this.bindingMapGen=this.procGenWrapper.create(e),this.shadowRoot},e.prototype.updateValues=function(e,t){if(2!==this.forceBindingMapUpdate){if(!(1===this.forceBindingMapUpdate&&t.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(e,t[0]))){var n=Object.create(null);for(S=0;S<t.length;S+=1)for(var o=t[S],r=o[0],i=o[1],a=o[2],s=o[3],l=n,c=0;c<r.length;c+=1){var u=r[c],d=l[u];if(!0===d)break;if(c===r.length-1){if(void 0===s)l[u]=!0;else{var p=a;if(void 0===d)l[u]=new Array(p);else if(!Array.isArray(d)){for(var h=new Array(p),f=Object.keys(d),v=0;v<f.length;v+=1){var g=f[v],_=d[g],$=Number(g);h.length<$&&(h.length=$),h[g]=_}l[u]=h}var m=l[u];m.length<p&&(m.length=p);var y=new Array(i.length);y.fill(!0),m.splice.apply(m,Ve([a,s],y,!1))}break}if(void 0===d){var b=Object.create(null);l[u]=b,l=b}else l=d}this.procGenWrapper.update(e,n)}}else for(var S=0;S<t.length;S+=1)this.tryBindingMapUpdate(e,t[S])},e.prototype.tryBindingMapUpdate=function(e,t){if(!t)return!0;var n=this.bindingMapGen;if(!n)return!1;var o=t[0];return 1===o.length&&this.procGenWrapper.bindingMapUpdate(o[0],e,n)},e}();!function(e){e.None="none",e.Simple="simple",e.SimpleWithRecursion="simple-recursion"}(qe||(qe={}));var Ze=null,Qe=function(){if(Ze)return Ze;var e=new Me;return Ze=e,e},Je=null,et=function(){return Je||(e=new g,Je=e,e);var e},tt={defaultComponentSpace:null,externalComponent:!1,templateEngine:new Xe,styleScope:w.globalScope(),extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,directSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:qe.Simple,propertyPassingDeepCopy:qe.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null},nt=function(e,t){var n=void 0===t?tt:t;if(void 0===e&&n!==tt)return n;var o=null!=e?e:{};return{externalComponent:void 0!==o.externalComponent?o.externalComponent:n.externalComponent,templateEngine:void 0!==o.templateEngine?o.templateEngine:n.templateEngine,styleScope:void 0!==o.styleScope?o.styleScope:n.styleScope,hostNodeTagName:void 0!==o.hostNodeTagName?o.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==o.extraStyleScope?o.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==o.multipleSlots?o.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==o.dynamicSlots?o.dynamicSlots:n.dynamicSlots,directSlots:void 0!==o.directSlots?o.directSlots:n.directSlots,reflectToAttributes:void 0!==o.reflectToAttributes?o.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==o.writeFieldsToNode?o.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==o.writeIdToDOM?o.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==o.useMethodCallerListeners?o.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==o.idPrefixGenerator?o.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==o.pureDataPattern?o.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==o.dataDeepCopy?o.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==o.propertyPassingDeepCopy?o.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==o.listenerChangeLifetimes?o.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==o.virtualHost?o.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==o.propertyEarlyInit?o.propertyEarlyInit:n.propertyEarlyInit}},ot=function(){function e(){this.empty=!0,this._$type="",this._$arr=null,this._$avoidErrorHandler=!1}return e.prototype.add=function(e){this._$arr?this._$arr=this._$arr.concat(e):this._$arr=[e],this.empty=!1},e.prototype.remove=function(e){var t=null;if(this._$arr){for(var n=[],o=this._$arr,r=0;r<o.length;r+=1){if(o[r]===e){n.push.apply(n,o.slice(r+1)),t=e;break}n.push(o[r])}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n){var o=this._$arr,r=!0;if(o)for(var i=0;i<o.length;i+=1)!1===ct(this._$type,o[i],e,t,n,this._$avoidErrorHandler)&&(r=!1);return r},e.safeCallback=function(e,t,n,o,r,i){void 0===i&&(i=!1);try{return t.apply(n,o)}catch(s){var a="[Error] [Component] ".concat(e||"Error Listener"," Error @ ");return n instanceof $e&&(a+=n.is),a+="#".concat(t.name||"(anonymous)"),r&&r.triggerLifetime("error",[s]),void function(e,t,n){if(n||!1!==it.call(e,[e,t])){if(tt.throwGlobalError)throw e;console.error(e instanceof Error?"".concat(e.message,"\n").concat(e.stack||""):String(e))}}(s,{message:a,type:e,element:n,method:t,args:o},i)}},e.addGlobalErrorListener=function(e){it.add(e)},e.removeGlobalErrorListener=function(e){it.remove(e)},e.addGlobalWarningListener=function(e){st.add(e)},e.removeGlobalWarningListener=function(e){st.remove(e)},e}();function rt(e){var t="[Warning] [Component] ".concat(e);st.call(t,[t])&&console.warn(t)}var it=new ot;it._$avoidErrorHandler=!0;var at,st=new ot,lt=function(){function e(){this.empty=!0,this._$type="",this._$arr=null}return e.prototype.add=function(e,t){var n={f:e,data:t};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1},e.prototype.remove=function(e){var t=null;if(this._$arr){for(var n=[],o=this._$arr,r=0;r<o.length;r+=1){var i=o[r];if(i.f===e){n.push.apply(n,o.slice(r+1)),t=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n,o){var r=this._$arr,i=!0;if(r)for(var a=0;a<r.length;a+=1){var s=r[a],l=s.f;n(s.data)&&!1===ot.safeCallback(this._$type,l,e,t,o)&&(i=!1)}return i},e}(),ct=ot.safeCallback,ut=ot.addGlobalErrorListener,dt=ot.removeGlobalErrorListener,pt=ot.addGlobalWarningListener,ht=ot.removeGlobalWarningListener,ft=function(){function e(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$boundElement=e}return e.prototype.attachChild=function(t){t._$mutationObserverTarget||(t._$mutationObserverTarget=new e(t)),this._$subtreeObserversCount>0&&t._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)},e.prototype.detachChild=function(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)},e.prototype.updateSubtreeCount=function(t){this._$subtreeObserversCount+=t,this._$boundElement.childNodes.forEach((function(n){n instanceof re&&(n._$mutationObserverTarget||(n._$mutationObserverTarget=new e(n)),n._$mutationObserverTarget.updateSubtreeCount(t))}))},e.prototype.hasSubtreeListeners=function(){return this._$subtreeObserversCount>0},e.callAttrObservers=function(e,t){var n,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.attrObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callTextObservers=function(e,t){for(var n,o=e.parentNode;o;){var r=o._$mutationObserverTarget;if(!r||0===r._$subtreeObserversCount)break;null===(n=r.textObservers)||void 0===n||n.call(o,[t]),o=o.parentNode}},e.callChildObservers=function(e,t){var n,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.childObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callAttachObservers=function(e,t){var n,o=e._$mutationObserverTarget;null===(n=null==o?void 0:o.attachObservers)||void 0===n||n.call(e,[t])},e}(),vt=function(){function e(e){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=null,this._$listener=e,this._$normalizedListener=null}return e.create=function(t){return new e(t)},e.prototype.observe=function(e,t){void 0===t&&(t={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1});var n,o=this._$listener;if(!o)throw new Error("A MutationObserver can only observe once");e._$mutationObserverTarget?n=e._$mutationObserverTarget:(n=new ft(e),e._$mutationObserverTarget=n),this._$listener=null;var r=t.subtree?o:function(e){e.target===this&&o.call(this,e)};this._$normalizedListener=r,this._$boundTarget=n,t.properties&&(n.attrObservers||(n.attrObservers=new ot),n.attrObservers.add(r),this._$boundFuncArrs.push(n.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(n.childObservers||(n.childObservers=new ot),n.childObservers.add(r),this._$boundFuncArrs.push(n.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(n.textObservers||(n.textObservers=new ot),n.textObservers.add(r),this._$boundFuncArrs.push(n.textObservers),this._$subtreeListenersCount+=1),t.subtree&&n.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(n.attachObservers||(n.attachObservers=new ot),n.attachObservers.add(r),this._$boundFuncArrs.push(n.attachObservers))},e.prototype.disconnect=function(){var e;null===(e=this._$boundTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);var t=this._$boundFuncArrs;this._$boundFuncArrs=[];var n=this._$normalizedListener;n&&t.forEach((function(e){e.remove(n)}))},e}(),gt=function(){function e(e,t){var n;if(this._$slotElement=null,this._$destroyOnDetach=!1,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$text=String(e),3===t.getBackendMode())n=t._$nodeTreeContext.document.createTextNode(e);else if(1===t.getBackendMode()){var o=t._$backendShadowRoot;n=(null==o?void 0:o.createTextNode(e))||null}else n=t._$nodeTreeContext.createTextNode(e);this._$backendElement=n,this.ownerShadowRoot=t,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}return e.create=function(t,n){return new e(t,n)},e.prototype.asTextNode=function(){return this},e.prototype.asElement=function(){return null},e.prototype.asNativeNode=function(){return null},e.prototype.asVirtualNode=function(){return null},e.prototype.asInstanceOf=function(){return null},e.prototype.destroyBackendElement=function(){this._$backendElement&&(3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.getBackendElement=function(){return this._$backendElement},e.prototype.getComposedParent=function(){if(void 0!==this.containingSlot)return this.containingSlot;for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e},Object.defineProperty(e.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this._$text},set:function(e){this._$text=String(e),this._$backendElement&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),ft.callTextObservers(this,{type:"characterData",target:this})},enumerable:!1,configurable:!0}),e}(),_t=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$t=function(e){function t(){throw new Error("Element cannot be constructed directly")}return _t(t,e),t.create=function(e,n,o,r){var i,a=Object.create(t.prototype);a.is=e,a._$placeholderHandler=r;var s,l=n._$nodeTreeContext;if(3===n.getBackendMode())s=l.document.createElement(e);else if(1===n.getBackendMode()){var c=n._$backendShadowRoot;s=(null==c?void 0:c.createElement(e,null!=o?o:e))||null}else s=l.createElement(e,null!=o?o:e);if(a._$initialize(!1,s,n,l),a.classList=new E(a,null),n&&s){var u=n.getHostNode()._$definition._$options.styleScope;if(u&&3!==n.getBackendMode()&&s.setStyleScope(u),tt.writeExtraInfoToAttr){var d=null===(i=n.getHostNode()._$behavior.ownerSpace)||void 0===i?void 0:i.styleScopeManager.queryName(u);d&&s.setAttribute("exparser:info-class-prefix","".concat(d,"--"))}}return s&&(3!==n.getBackendMode()?s.associateValue(a):n._$nodeTreeContext.associateValue(s,a)),a},t.prototype.setModelBindingListener=function(e,t){var n=this;if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[e]){var o=this.getBackendElement();if(o){var r=function(t){var o,r=null===(o=n._$modelBindingListeners)||void 0===o?void 0:o[e];r&&r.call(n,t)};3===this.getBackendMode()?this.getBackendContext().setModelBindingStat(o,e,r):o.setModelBindingStat(e,r)}}this._$modelBindingListeners[e]=t},t}(re),mt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.Direct=0]="Direct",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(at||(at={}));var yt,bt=function(e,t,n){var o=t.waiting;if(o)return o.add(e),o.hintUsed(n),function(){o.remove(e)}},St=function(e){function t(){throw new Error("Element cannot be constructed directly")}return mt(t,e),t.createShadowRoot=function(e){var n,o=Object.create(t.prototype),r=1===e.getBackendMode()&&(null===(n=e.getBackendElement())||void 0===n?void 0:n.getShadowRoot())||null;o._$initializeVirtual("shadow",o,e._$nodeTreeContext,r),o._$idMap=null;var i=1,a=e.getComponentOptions();return a.multipleSlots?i=2:a.dynamicSlots?i=3:a.directSlots&&(i=0),o._$slotMode=i,1===i?o._$singleSlot=null:2===i?(o._$slots=Object.create(null),o._$slotsList=Object.create(null)):3===i&&(o._$dynamicSlotsInserted=!1,o._$dynamicSlots=new Map,o._$requiredSlotValueNames=[],o._$propertyPassingDeepCopy=V(a.propertyPassingDeepCopy),o._$insertDynamicSlotHandler=void 0,o._$removeDynamicSlotHandler=void 0,o._$updateDynamicSlotHandler=void 0),o._$backendShadowRoot=r,o._$initialize(!0,r,o,e._$nodeTreeContext),o._$host=e,e.shadowRoot=o,o},t.prototype.getHostNode=function(){return this._$host},t.prototype.createTextNode=function(e){return void 0===e&&(e=""),new gt(e,this)},t.prototype.createNativeNode=function(e){return $t.create(e,this)},t.prototype.createVirtualNode=function(e){return void 0===e&&(e="virtual"),se.create(e,this)},t.prototype.createNativeNodeWithInit=function(e,t,n,o){var r=$t.create(e,this,t,n);return null==o||o(r),r},t.prototype.createComponent=function(e,t,n,o,r){var i,a=this._$host,s=a._$behavior,l=a._$genericImpls,c=s.ownerSpace,u=void 0===t?e:t,d=s._$using[u];if("string"==typeof d)return this.createNativeNodeWithInit(d,e,void 0,r);if(d){var p=void 0;d.final?p=d.final:null!==d.placeholder&&(p=ve(d.placeholder,c,d.source,l));var h=o?bt(o,d,a):void 0;if("string"==typeof p)return this.createNativeNodeWithInit(p,e,h,r);if(p)return $e._$advancedCreate(e,p,this,null,fe(p,s,a,n),h,r)}var f=l&&l[u];if("string"==typeof f)return this.createNativeNodeWithInit(f,e,void 0,r);if(f){var v=void 0;if(f.final?v=f.final:null!==f.placeholder&&(v=ve(f.placeholder,c,f.source,l)),h=o?bt(o,f,a):void 0,"string"==typeof v)return this.createNativeNodeWithInit(v,e,h,r);if(v)return $e._$advancedCreate(e,v,this,null,fe(v,s,a,n),h,r)}var g=null!==(i=c.getGlobalUsingComponent(u))&&void 0!==i?i:c.getDefaultComponent();if(!g)throw new Error('Cannot find component "'.concat(u,'"'));return"string"==typeof g?this.createNativeNodeWithInit(g,e,void 0,r):$e._$advancedCreate(e,g,this,null,fe(g,s,a,n),void 0,r)},t.prototype.createComponentOrNativeNode=function(e,t,n){var o=this._$host,r=o._$behavior,i=r.ownerSpace.getGlobalUsingComponent(e);if("string"==typeof i)return this.createNativeNodeWithInit(i,e,void 0,n);if(i)return $e._$advancedCreate(e,i,this,null,fe(i,r,o,t),void 0,n);var a=$t.create(e,this);return null==n||n(a),a},t.prototype.checkComponentPlaceholder=function(e){var t,n,o=this._$host._$behavior._$using[e];if(void 0!==o)n=o;else{var r=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!r)return;n=r}return"string"!=typeof n&&!n.final&&null!==n.placeholder},t.prototype.getElementById=function(e){return this._$getIdMap()[e]},t.prototype._$markIdCacheDirty=function(){this._$idMap=null},t.prototype._$getIdMap=function(){if(this._$idMap)return this._$idMap;var e=re._$generateIdMap(this);return this._$idMap=e,e},t.prototype.getSlotElementFromName=function(e){var t=this._$slotMode;if(0===t)throw new Error("cannot get slot element in directSlots");if(1===t)return this._$singleSlot;if(2===t)return this._$slots[e]||null;if(3===t){for(var n=[],o=this._$subtreeSlotStart;o;o=o.next){var r=o.value;(r._$slotName||"")===e&&n.push(r)}return n}return null},t.prototype.getContainingSlot=function(e){var t,n,o=this._$slotMode;if(0===o)return(null==e?void 0:e.containingSlot)||null;if(1===o)return this._$singleSlot;if(3===o){if(!e)return null;for(var r=e;null===(t=r.parentNode)||void 0===t?void 0:t._$inheritSlots;)r=r.parentNode;var i=r._$slotElement;if((null==i?void 0:i.ownerShadowRoot)===this)return i}return 2===o?(n=e instanceof re?e._$nodeSlot:"",this._$slots[n]||null):null},t.prototype.getSlotContentArray=function(e){if(null===e._$slotName)return null;var t=[];return this.forEachNodeInSpecifiedSlot(e,(function(e){t.push(e)})),t},t.prototype.forEachSlot=function(e){var t=this._$slotMode;if(0===t)throw new Error("Cannot iterate slots in directSlots");if(1===t)this._$singleSlot&&e(this._$singleSlot);else if(2===t)for(var n=Object.values(this._$slots),o=0;o<n.length&&!1!==e(n[o]);o+=1);else if(3===t)for(var r=this._$subtreeSlotStart;r&&!1!==e(r.value);r=r.next);},t.prototype.forEachNodeInSlot=function(e){for(var t=this._$host.childNodes,n=0;n<t.length;n+=1)if(!re.forEachNodeInSlot(t[n],e))return!1;return!0},t.prototype.forEachNodeInSpecifiedSlot=function(e,t){if(e){for(var n=e.slotNodes,o=0;o<n.length;o+=1){var r=n[o];if(!1===t(r))return!1}return!0}return this.forEachNodeInSlot((function(e,n){return null!==n||t(e)}))},t.prototype.forEachSlotContentInSlot=function(e){for(var t=this._$host.childNodes,n=0;n<t.length;n+=1)if(!re.forEachSlotContentInSlot(t[n],e))return!1;return!0},t.prototype.forEachSlotContentInSpecifiedSlot=function(e,t){if(e){for(var n=e.slotNodes,o=0;o<n.length;o+=1){var r=n[o];if(!r._$inheritSlots&&!1===t(r))return!1}return!0}return this.forEachSlotContentInSlot((function(e,n){return null!==n||t(e)}))},t.prototype.isConnected=function(e){if(e.ownerShadowRoot!==this)return!1;for(var t=e;t;t=t.parentNode)if(t===this)return!0;return!1},t.prototype._$applyMultipleSlotInsertion=function(e,t,n){var o=this._$slotsList,r=this._$slots;if(o[t]){for(var i=o[t],a={next:i},s=!0,l=this._$subtreeSlotStart;l&&a.next&&l.value!==e;l=l.next)l.value===a.next.value&&(s=!1,a=a.next);if(s)o[t]=i.prev={value:e,prev:null,next:i};else{var c=a.next;a.next={value:e,prev:a,next:c},c&&(c.prev=a.next)}}else o[t]={value:e,prev:null,next:null};var u=r[t],d=o[t].value;u!==d&&(r[t]=d,re._$insertChildReassignSlot(this,t,u||null,d))},t.prototype._$applyMultipleSlotsRemoval=function(e,t,n){for(var o=this._$slotsList,r=this._$slots,i=o[t]||null;i&&i.value!==e;i=i.next);if(i){var a=i.prev,s=i.next;if(a&&(a.next=s),s&&(s.prev=a),!a){var l=s;if(l){var c=l.value;o[t]=l,n||(r[t]=c,re._$insertChildReassignSlot(this,t,e,c))}else delete o[t],n||(delete r[t],re._$insertChildReassignSlot(this,t,e,null))}}},t.prototype._$applySlotRename=function(e,t,n){var o=this._$slotMode;if(1!==o&&0!==o){if(2===o)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===o){if(!this._$dynamicSlotsInserted)return;var r=this._$insertDynamicSlotHandler,i=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==i||i([e]),null==r||r([{slot:e,name:t,slotValues:e._$slotValues}])}}},t.prototype._$applySlotsInsertion=function(e,t,n){var o=this._$slotMode;if(0!==o){if(1===o){var r=this._$singleSlot,i=this._$subtreeSlotStart.value;if(r===i)return;return this._$singleSlot=i,void re._$insertChildReassignSlot(this,null,r||null,i)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var a=this._$insertDynamicSlotHandler,s=[],l=e;l&&l!==t.next;l=l.next)d=(u=l.value)._$slotName,this._$dynamicSlots.set(u,{updatePathTree:void 0}),s.push({slot:u,name:d,slotValues:u._$slotValues});null==a||a(s)}}else for(var c=e;c&&c!==t.next;c=c.next){var u,d=(u=c.value)._$slotName;this._$applyMultipleSlotInsertion(u,d,n)}}},t.prototype._$applySlotsRemoval=function(e,t,n){var o,r=this._$slotMode;if(0!==r){if(1===r){if(n)return;var i=this._$singleSlot,a=null===(o=this._$subtreeSlotStart)||void 0===o?void 0:o.value;if(i===a)return;return this._$singleSlot=a,void re._$insertChildReassignSlot(this,null,i||null,a||null)}if(2!==r){if(3===r){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var s=this._$removeDynamicSlotHandler,l=[],c=e;c&&c!==t.next;c=c.next)d=c.value,this._$dynamicSlots.delete(d),l.push(d);null==s||s(l)}}else for(var u=e;u&&u!==t.next;u=u.next){var d,p=(d=u.value)._$slotName;this._$applyMultipleSlotsRemoval(d,p,n)}}},t.prototype.setDynamicSlotHandler=function(e,t,n,o){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=o,this._$dynamicSlotsInserted))for(var r=this._$dynamicSlots.values(),i=r.next();!i.done;i=r.next()){var a=i.value;a.updatePathTree=a.updatePathTree||Object.create(null)}},t.prototype.useDynamicSlotHandlerFrom=function(e){e._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(e._$requiredSlotValueNames.slice(),e._$insertDynamicSlotHandler,e._$removeDynamicSlotHandler,e._$updateDynamicSlotHandler)},t.prototype.replaceSlotValue=function(e,t,n){var o,r=e._$slotValues;if(r){var i=r[t],a=n;if(0!==this._$propertyPassingDeepCopy&&(a=2===this._$propertyPassingDeepCopy?I(n,!0):T(n)),i!==a&&(r[t]=a,!(this._$requiredSlotValueNames.indexOf(t)<0))){var s=null===(o=this._$dynamicSlots)||void 0===o?void 0:o.get(e);s&&(s.updatePathTree||(s.updatePathTree=Object.create(null)),s.updatePathTree[t]=!0)}}},t.prototype.applySlotValueUpdates=function(e){var t,n,o=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),r=null==o?void 0:o.updatePathTree;r&&(o.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,r))},t.prototype.applySlotUpdates=function(){var e;if(this._$dynamicSlotsInserted)for(var t=this._$dynamicSlots.entries(),n=t.next();!n.done;n=t.next()){var o=n.value,r=(c=o[0],o[1]),i=r.updatePathTree;i&&(r.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,c,c._$slotValues,i))}else{this._$dynamicSlotsInserted=!0;for(var a=this._$insertDynamicSlotHandler,s=[],l=this._$subtreeSlotStart;l;l=l.next){var c,u=(c=l.value)._$slotName;this._$dynamicSlots.set(c,{updatePathTree:void 0}),s.push({slot:c,name:u,slotValues:c._$slotValues})}null==a||a(s)}},t.prototype.getSlotMode=function(){return this._$slotMode},t._$updateSubtreeSlotNodes=function(e,t,n,o,r){if(n||o){var i=null==n?void 0:n.getSlotMode(),a=null==o?void 0:o.getSlotMode();if(void 0!==i&&0!==i||void 0!==a&&0!==a){if(!(void 0!==i&&1!==i||void 0!==a&&1!==a)){for(var s=-1,l=0,c=-1,u=[],d=t[0].containingSlot,p=null==n?void 0:n.getContainingSlot(t[0]),h=0;h<t.length;h+=1){var f=t[h];re.forEachNodeInSlot(f,(function(e){d&&(l?l+=1:(s=e.slotIndex,l=1)),u.push(e)}))}if(p&&u.length){var v=u[0];c=re._$findSlotNodeInsertPosition(p,v,r)}return{updateContainingSlot:function(){for(var e=u.length-1;e>=0;e-=1){var t=u[e];re._$updateContainingSlot(t,p)}},removeSlotNodes:function(){o&&d&&l&&re._$spliceSlotNodes(d,s,l,void 0)},insertSlotNodes:function(){n&&p&&u.length&&re._$spliceSlotNodes(p,c,0,u)}}}var g=new Map,_=new Map,$=[];for(h=0;h<t.length;h+=1)f=t[h],re.forEachNodeInSlot(f,(function(e,t){var o=0!==i?null==n?void 0:n.getContainingSlot(e):void 0;if(t){var r=_.get(t);r?r.count+=1:_.set(t,{start:e.slotIndex,count:1})}if(o){var a=g.get(o);a?a.nodes.push(e):g.set(o,{nodes:[e],insertPos:-1})}$.push([e,o])}));if(n&&g.size)for(var m=g.entries(),y=m.next();!y.done;y=m.next()){var b=y.value,S=b[0],C=b[1].nodes[0];y.value[1].insertPos=re._$findSlotNodeInsertPosition(S,C,r)}return{updateContainingSlot:function(){for(var e=$.length-1;e>=0;e-=1){var t=$[e],n=t[0],o=t[1];re._$updateContainingSlot(n,o)}},removeSlotNodes:function(){if(o&&_.size)for(var e=_.entries(),t=e.next();!t.done;t=e.next()){var n=t.value,r=n[0],i=n[1],a=i.start,s=i.count;re._$spliceSlotNodes(r,a,s,void 0)}},insertSlotNodes:function(){if(n&&g.size)for(var e=g.entries(),t=e.next();!t.done;t=e.next()){var o=t.value,r=o[0],i=o[1],a=i.nodes,s=i.insertPos;re._$spliceSlotNodes(r,s,0,a)}}}}}},t}(se),Ct=function(e){if(e instanceof re){var t;return t=e instanceof se?"(virtual):".concat(e.is):e instanceof $e?"".concat(e.tagName,":").concat(e.is):e instanceof $t?e.is:"(unknown)","<".concat(t).concat(function(e){var t="";if(e instanceof re){null!==e._$slotName&&(t+=' (slot) name="'.concat(e._$slotName,'"')),e.id&&(t+=' id="'.concat(e.id,'"')),e.slot&&(t+=' slot="'.concat(e.slot,'"'));var n=e.class;n&&(t+=' class="'.concat(n,'"')),e.style&&(t+=' style="'.concat(e.style,'"'))}return e instanceof se||(e instanceof $e?$e.listProperties(e).forEach((function(n){t+=" ".concat(n,'="').concat(String(e.data[n]),'"')})):e.attributes.forEach((function(e){t+=" ".concat(e.name,'="').concat(String(e.value),'"')}))),t}(e),">")}return e instanceof gt?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"},wt=function(e,t,n){void 0===n&&(n=0);for(var o="",r=n;r;r-=1)o+=" ";var i=o+Ct(e),a=!1;return e instanceof re&&(e instanceof $e&&(a=e._$external),t?a?(i+="\n".concat(o," <(external)>"),e.forEachComposedChild((function(e){i+="\n".concat(wt(e,t,n+2))}))):e.forEachComposedChild((function(e){i+="\n".concat(wt(e,t,n+1))})):e.childNodes.forEach((function(e){i+="\n".concat(wt(e,t,n+1))}))),i},Et=function(e,t){console.log(wt(e,t))};!function(e){e.ShadowAncestors="shadow-ancestors",e.ComposedAncestors="composed-ancestors",e.ShadowDescendantsRootFirst="shadow-descendants-root-first",e.ShadowDescendantsRootLast="shadow-descendants-root-last",e.ComposedDescendantsRootFirst="composed-descendants-root-first",e.ComposedDescendantsRootLast="composed-descendants-root-last"}(yt||(yt={}));var Nt=function(){function e(e,t,n){if(void 0===n&&(n=re),!(e instanceof re||e instanceof gt))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=e,this._$nodeTypeLimit=n||re,"shadow-ancestors"===t||"shadow-descendants-root-first"===t||"shadow-descendants-root-last"===t)this._$composed=!1;else{if("composed-ancestors"!==t&&"composed-descendants-root-first"!==t&&"composed-descendants-root-last"!==t)throw new Error('Unrecognized iterator type "'.concat(String(t),'"'));this._$composed=!0}this._$isAncestor="shadow-ancestors"===t||"composed-ancestors"===t,this._$rootFirst="shadow-descendants-root-first"===t||"composed-descendants-root-first"===t}return e.create=function(t,n,o){return new e(t,n,o)},e.prototype.forEach=function(e){var t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor)for(var o=this._$node;;){if(o instanceof t&&!1===e(o))return;var r;if(!(r=n?o.getComposedParent():o.parentNode))break;o=r}else{var i=this._$rootFirst,a=function(o){if(i&&o instanceof t&&!1===e(o))return!1;if(o instanceof re){var r=!1,s=function(e){return!1!==a(e)||(r=!0,!1)};if(n?o.forEachComposedChild(s):o.childNodes.forEach(s),r)return!1}return!(!i&&o instanceof t&&!1===e(o))};a(this._$node)}},e}(),kt=function(e,t){var n,o;n=e.getBackendContext(),o=t||null,n.render((function(){"function"==typeof o&&ct("render",o,n,[null])}))},Ot=function(e){return Qe().defineBehavior(e)},xt=function(e){return Qe().defineComponent(e)};function At(e,t){return $e.create(e,t||null)}var Mt=Q.triggerEvent,Lt=Q.triggerExternalEvent;module.exports=t})();
2
- //# sourceMappingURL=glass_easel.all.js.map
1
+ "use strict";var e;exports.BackendMode=void 0,(e=exports.BackendMode||(exports.BackendMode={}))[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike";var t,n=Object.freeze({__proto__:null,BM:{DYNAMIC:!0,SHADOW:!1,COMPOSED:!1,DOMLIKE:!1},get BackendMode(){return exports.BackendMode}}),o=Object.freeze({__proto__:null}),s=Object.freeze({__proto__:null});process.env.NODE_ENV,exports.DeepCopyKind=void 0,(t=exports.DeepCopyKind||(exports.DeepCopyKind={})).None="none",t.Simple="simple",t.SimpleWithRecursion="simple-recursion";const i={defaultComponentSpace:null,externalComponent:!1,templateEngine:null,styleScope:null,extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,directSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:exports.DeepCopyKind.Simple,propertyPassingDeepCopy:exports.DeepCopyKind.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null,devtool:null},r=(e,t)=>{const n=void 0===t?i:t;if(void 0===e&&n!==i)return n;const o=null!=e?e:{};return{externalComponent:void 0!==o.externalComponent?o.externalComponent:n.externalComponent,templateEngine:void 0!==o.templateEngine?o.templateEngine:n.templateEngine,styleScope:void 0!==o.styleScope?o.styleScope:n.styleScope,hostNodeTagName:void 0!==o.hostNodeTagName?o.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==o.extraStyleScope?o.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==o.multipleSlots?o.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==o.dynamicSlots?o.dynamicSlots:n.dynamicSlots,directSlots:void 0!==o.directSlots?o.directSlots:n.directSlots,reflectToAttributes:void 0!==o.reflectToAttributes?o.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==o.writeFieldsToNode?o.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==o.writeIdToDOM?o.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==o.useMethodCallerListeners?o.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==o.idPrefixGenerator?o.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==o.pureDataPattern?o.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==o.dataDeepCopy?o.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==o.propertyPassingDeepCopy?o.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==o.listenerChangeLifetimes?o.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==o.virtualHost?o.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==o.propertyEarlyInit?o.propertyEarlyInit:n.propertyEarlyInit}};class l{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}add(e){this._$arr?this._$arr=this._$arr.concat(e):this._$arr=[e],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],o=this._$arr;for(let s=0;s<o.length;s+=1){if(o[s]===e){n.push(...o.slice(s+1)),t=e;break}n.push(o[s])}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n){const o=this._$arr;let s=!0;if(o)for(let i=0;i<o.length;i+=1){!1===c(this._$type,o[i],e,t,n)&&(s=!1)}return s}}class a{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}add(e,t){const n={f:e,data:t};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],o=this._$arr;for(let s=0;s<o.length;s+=1){const i=o[s];if(i.f===e){n.push(...o.slice(s+1)),t=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n,o,s){const i=this._$arr;let r=!0;if(i)for(let l=0;l<i.length;l+=1){const{f:a,data:d}=i[l];if(!n(d))continue;const h=c(this._$type,a,e,t,o);!1===(s?s(h):h)&&(r=!1)}return r}}let d=()=>{};function c(e,t,n,o,s){try{return t.apply(n,o)}catch(n){return void d(n,`${e||"Listener"} ${t.name||"(anonymous)"}`,s)}}const h=Symbol("TextNode"),u=Symbol("Element"),p=Symbol("NativeNode"),f=Symbol("VirtualNode"),$=Symbol("ShadowRootSymbol"),_=Symbol("Component"),g=e=>!!e&&e[h],m=e=>!!e&&e[u],v=e=>!!e&&e[p],b=e=>!!e&&e[f],S=e=>!!e&&e[$],y=e=>!!e&&e[_],C=e=>{if(m(e)){let t;return t=b(e)?`(virtual):${e.is}`:y(e)?`${e.tagName}:${e.is}`:v(e)?e.is:"(unknown)",`<${t}${(e=>{let t="";if(m(e)){null!==e._$slotName&&(t+=` (slot) name="${e._$slotName}"`),e.id&&(t+=` id="${e.id}"`),e.slot&&(t+=` slot="${e.slot}"`);const n=e.class;n&&(t+=` class="${n}"`),e.style&&(t+=` style="${e.style}"`)}return b(e)||(y(e)?Object.keys(e._$behavior._$propertyMap).forEach((n=>{t+=` ${n}="${String(e.data[n])}"`})):e.attributes.forEach((e=>{t+=` ${e.name}="${String(e.value)}"`}))),t})(e)}>`}return g(e)?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"},w=(e,t,n=0)=>{let o="";for(let e=n;e;e-=1)o+=" ";let s=o+C(e),i=!1;return m(e)&&(y(e)&&(i=e._$external),t?i?(s+=`\n${o} <(external)>`,e.forEachComposedChild((e=>{s+=`\n${w(e,t,n+2)}`}))):e.forEachComposedChild((e=>{s+=`\n${w(e,t,n+1)}`})):e.childNodes.forEach((e=>{s+=`\n${w(e,t,n+1)}`}))),s};let N=!1;const E=new l("error"),x=new l("warning");function k(e,t,n,o){if(!N){N=!0,y(n)&&n.triggerLifetime("error",[e]);const s=!1===E.call(e,[e,t,n,o]);if(N=!1,s)return}if(i.throwGlobalError)throw e;console.error([e instanceof Error?`${e.message}`:String(e),o?`\t@${C(o)}`:void 0,n?`\t${t||""}@${"string"==typeof n?`<${n}>`:C(n||!1)}`:void 0].filter(Boolean).join("\n"))}function O(e,t,n){x.call(null,[e,t||"",n])&&console.warn(e)}d=k;class M extends Error{constructor(e,t,n,o){super(e),this.additionalStack=t,this.relatedComponent=n,this.element=o,k(this,t,n,o)}}const L=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"];var D;!function(e){e[e.Fragment=0]="Fragment",e[e.Element=1]="Element",e[e.TextNode=2]="TextNode",e[e.Component=3]="Component",e[e.VirtualNode=4]="VirtualNode"}(D||(D={}));class A{constructor(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new B}destroy(){}getWindowWidth(){return 1}getWindowHeight(){return 1}getDevicePixelRatio(){return 1}getTheme(){return"light"}registerStyleSheetContent(e,t){}appendStyleSheetPath(e,t){const n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n}disableStyleSheet(e){}render(e){if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{const t=this._$renderCallbacks=[e];setTimeout((()=>{this._$renderCallbacks=null,t.forEach((e=>{c("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$shadowRoot}createFragment(){return new T(0)}onEvent(e,t){}}class T{constructor(e){this._$shadowRoot=3===e?new B:null}release(){}associateValue(e){}getShadowRoot(){return this._$shadowRoot||void 0}appendChild(e){}removeChild(e,t){}insertBefore(e,t,n){}replaceChild(e,t,n){}spliceBefore(e,t,n){}spliceAppend(e){}spliceRemove(e,t){}setId(e){}setSlotName(e){}setContainingSlot(e){}reassignContainingSlot(e,t){}spliceBeforeSlotNodes(e,t,n){}spliceRemoveSlotNodes(e,t){}spliceAppendSlotNodes(e){}setInheritSlots(){}setStyle(e){}addClass(e){}removeClass(e){}clearClasses(){}setClassAlias(e,t){}setAttribute(e,t){}removeAttribute(e){}setDataset(e,t){}setText(e){}setListenerStats(e,t,n){}setModelBindingStat(e,t){}}class B extends T{constructor(){super(4)}createElement(e,t){return new T(1)}createTextNode(e){return new T(2)}createComponent(e,t,n,o,s,i){return new T(3)}createVirtualNode(e){return new T(4)}}class I{release(){}associateValue(e){}appendChild(e){}removeChild(e,t){}insertBefore(e,t,n){}replaceChild(e,t,n){}spliceBefore(e,t,n){}spliceAppend(e){}spliceRemove(e,t){}setId(e){}setStyleScope(e,t,n){}setStyle(e){}addClass(e,t){}removeClass(e,t){}clearClasses(){}setAttribute(e,t){}removeAttribute(e){}setText(e){}getBoundingClientRect(e){setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}setListenerStats(e,t,n){}setModelBindingStat(e,t){}createIntersectionObserver(e,t,n,o){return{disconnect:()=>{}}}getContext(e){e(null)}}const R=/\s+/;class P{constructor(){this._$names=[""]}static globalScope(){return 0}register(e){const t=this._$names.length;return this._$names.push(e),t}queryName(e){return this._$names[e]}}class j{constructor(e,t,n,o,s,i){this._$externalNames=void 0,this._$externalRawAlias=null,this._$dirtyExternalNames=null,this._$rawNames=[],this._$backendNames=[],this._$backendNameScopes=[],this._$backendNamesCount=[],this._$hasAliasNames=!1,this._$element=e,this._$owner=n,this._$defaultScope=o,this._$extraScope=s,this._$rootScope=(null==n?void 0:n._$owner)?n._$rootScope:o,this._$prefixManager=i,t&&(this._$externalNames=t,this._$externalRawAlias=[])}_$resolvePrefixes(e,t){const n=this._$owner,o=null==n?void 0:n._$externalNames,s=o?o.indexOf(e):-1;if(n&&-1!==s){this._$hasAliasNames=!0;const e=n._$externalRawAlias[s];if(e)for(let o=0;o<e.length;o+=1)n._$resolvePrefixes(e[o],t)}else if("~"===e[0])t(this._$rootScope,e.slice(1));else if("^"===e[0]){let n=e.slice(1),o=this._$owner;for(;"^"===n[0];)n=n.slice(1),o=null==o?void 0:o._$owner;t((null==o?void 0:o._$owner)?o._$defaultScope:this._$rootScope,n)}else void 0!==this._$extraScope&&t(this._$extraScope,e),t(this._$defaultScope,e)}_$hasAlias(e){return!!this._$externalNames&&this._$externalNames.includes(e)}_$setAlias(e,t){if(!this._$externalNames)return;let n;if(null==t)n=[];else if(Array.isArray(t)){n=Array(t.length);for(let e=0,o=t.length;e<o;e+=1)n[e]=String(t[e])}else n=String(t).split(R).filter((e=>""!==e));const o=this._$externalNames.indexOf(e);-1!==o&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(e),this._$externalRawAlias[o]=n)}_$getAlias(){return this._$externalNames}_$spreadExternalClassUpdate(){const e=this._$owner;if(!(null==e?void 0:e._$dirtyExternalNames)||!this._$hasAliasNames)return!1;const t=e._$dirtyExternalNames,n=this._$externalNames;if(n)for(let e=0;e<n.length;e+=1){const o=this._$externalRawAlias[e]||[];for(let s=0;s<t.length;s+=1)o.includes(t[s])&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(n[e]))}const o=this._$rawNames.some((e=>e.some((e=>t.includes(e)))));return o&&this._$updateResolvedNames(),!!this._$dirtyExternalNames||o}_$shouldUpdateExternalClass(){if(!this._$dirtyExternalNames)return!1;if(1===this._$element.getBackendMode()){const e=this._$dirtyExternalNames;for(let t=0;t<e.length;t+=1){const n=e[t],o=this._$externalNames.indexOf(n),s=this._$externalRawAlias[o]||[];this._$element._$backendElement.setClassAlias(n,s)}return this._$dirtyExternalNames=null,!1}return!0}_$markExternalClassUpdated(){this._$dirtyExternalNames=null}_$updateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames,n=this._$backendNames,o=this._$backendNameScopes,s=this._$backendNamesCount,i=[],r=[],l=[];if(this._$hasAliasNames=!1,1===this._$element.getBackendMode())for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];let o=!1;for(let e=0;e<i.length;e+=1)if(t===i[e]){l[e]+=1,o=!0;break}o||(i.push(t),r.push(void 0),l.push(1))}}else for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];this._$resolvePrefixes(t,((e,t)=>{for(let n=0;n<i.length;n+=1)if(t===i[n]&&e===r[n])return void(l[n]+=1);i.push(t),r.push(e),l.push(1)}))}}let a=!1;for(let t=0;t<i.length;t+=1){let l=!1;for(let e=0;e<n.length;e+=1)if(i[t]===n[e]&&r[t]===o[e]){l=!0,s[e]=0;break}l||(a=!0,this._$addClassToBackend(i[t],r[t],e))}for(let t=0;t<n.length;t+=1)0!==s[t]&&(a=!0,this._$removeClassFromBackend(n[t],o[t],e));return this._$backendNames=i,this._$backendNameScopes=r,this._$backendNamesCount=l,a}_$addClassToBackend(e,t,n){var o;if(3===this._$element.getBackendMode()){const s=void 0===t?"":null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t),i=s?`${s}--${e}`:e;n.classList.add(i)}else 2===this._$element.getBackendMode()?n.addClass(e,t):n.addClass(e)}_$removeClassFromBackend(e,t,n){var o;if(3===this._$element.getBackendMode()){const s=t&&(null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t)),i=s?`${s}--${e}`:e;n.classList.remove(i)}else 2===this._$element.getBackendMode()?n.removeClass(e,t):n.removeClass(e)}_$addClass(e,t,n){const o=this._$backendNames,s=this._$backendNameScopes,i=this._$backendNamesCount;let r=!1;for(let n=0;n<o.length;n+=1)if(e===o[n]&&t===s[n]){r=!0,i[n]+=1;break}r||(o.push(e),s.push(t),i.push(1),this._$addClassToBackend(e,t,n))}_$removeClass(e,t,n){const o=this._$backendNames,s=this._$backendNameScopes,i=this._$backendNamesCount;for(let r=0;r<o.length;r+=1)if(e===o[r]&&t===s[r]){i[r]<=1?(o.splice(r,1),s.splice(r,1),i.splice(r,1),this._$removeClassFromBackend(e,t,n)):i[r]-=1;break}}toggle(e,t,n=0){if(R.test(e))throw new Error("Class name contains space characters.");const o=this._$element._$backendElement,s=this._$rawNames[n]?this._$rawNames[n].indexOf(e):-1;let i=!1;if(void 0===t?-1===s:!!t){if(-1===s){const t=this._$rawNames;t[n]||(t[n]=[]);t[n].push(e),o&&(1===this._$element.getBackendMode()?this._$addClass(e,void 0,o):this._$resolvePrefixes(e,((e,t)=>{this._$addClass(t,e,o)}))),i=!0}}else if(-1!==s){const t=this._$rawNames[n];t&&t.splice(s,1),o&&(1===this._$element.getBackendMode()?this._$removeClass(e,void 0,o):this._$resolvePrefixes(e,((e,t)=>{this._$removeClass(t,e,o)}))),i=!0}return i}contains(e,t=0){const n=this._$rawNames[t]||[];for(let t=0;t<n.length;t+=1){const o=n[t];if("~"===o[0]){if(o.slice(1)===e)return!0}else if("^"===o[0]){let t=o.slice(1);for(;"^"===t[0];)t=t.slice(1);if(t===e)return!0}else if(o===e)return!0}return!1}setClassNames(e,t=0){let n;if(null==e)n=[];else if(Array.isArray(e)){n=Array(e.length);for(let t=0,o=e.length;t<o;t+=1)n[t]=String(e[t])}else n=String(e).split(R).filter((e=>""!==e));return this._$rawNames[t]=n,this._$updateResolvedNames()}getClassNames(e=0){const t=this._$rawNames[e]||[];return t?t.join(" "):""}}const U=Symbol("method");var F=Object.freeze({__proto__:null,METHOD_TAG:U});class G{constructor(e,t){this.ownerSpace=e,this._$trans=t}_$implement(e){var t;return(null===(t=this._$trans)||void 0===t?void 0:t.call(this,e))||e}}class V{constructor(){this._$traits=new WeakMap}implement(e,t){const n=e._$implement(t);this._$traits.set(e,n)}get(e){return this._$traits.get(e)}}const W=(e,t)=>{let n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");const o=[];for(let e=0;e<n.length;e+=1){const t=n[e];""!==t&&"."!==t&&(".."!==t?o.push(t):o.pop())}return o.join("/")},H=(e,t)=>{const n=e.indexOf("://");if(n>0){const t=e.indexOf("/",n+3);if(t>0){return{domain:e.slice(0,t),absPath:W(e.slice(t+1),"")}}return{domain:e.slice(0,n+3),absPath:W(e.slice(n+3),"")}}return{domain:null,absPath:W(e,t)}};class z{constructor(e,t,n){this._$callbacks=[],this._$ownerSpace=e,this._$isPub=t,this._$alias=n}add(e){this._$callbacks.push(e)}hintUsed(e){var t,n;null===(n=(t=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(t,this._$isPub,this._$alias,e)}remove(e){const t=this._$callbacks.indexOf(e);this._$callbacks.splice(t,1)}call(e){const t=this._$callbacks;this._$callbacks=[];for(let n=0;n<t.length;n+=1){(0,t[n])(e)}}}class K{constructor(e,t,n,o=!0){this._$behaviorList=Object.create(null),this._$pubBehaviorList=Object.create(null),this._$list=Object.create(null),this._$pubList=Object.create(null),this._$using=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),this._$groupingListWaiting=null,this._$componentWaitingListener=null,this._$allowUnusedNativeNode=!0,t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=r({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new P,this._$allowUnusedNativeNode=o}updateComponentOptions(e){this._$componentOptions=r(e,this._$componentOptions)}getComponentOptions(){return this._$componentOptions}setGlobalUsingComponent(e,t){this._$using[e]=t}importSpace(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}}getComponentByUrl(e,t){const{domain:n,absPath:o}=H(e,t),s=this.getComponent(o,!0,n);if(!s)throw new Error(`There is no component "${o}" in the space and no default component can be used`);return s}getComponentByUrlWithoutDefault(e,t){const{domain:n,absPath:o}=H(e,t);return this.getComponent(o,!1,n)||null}getComponent(e,t=!0,n=null){let o;if(n){const e=this._$importedSpaces[n];if(e){const{space:t,privateUse:n}=e;o=n?t._$list:t._$pubList}}else o=this._$list;if(o){const t=o[e];if(t)return t}if(t)return this._$list[this._$defaultComponent]}getDefaultComponent(){return this._$list[this._$defaultComponent]||null}isDefaultComponent(e){return this._$list[this._$defaultComponent]===e}getGlobalUsingComponent(e){return this._$using[e]||null}getBehaviorByUrl(e,t){const{domain:n,absPath:o}=H(e,t);return this._$getBehavior(o,n)||null}_$getBehavior(e,t=null){let n;if(t){const e=this._$importedSpaces[t];if(e){const{space:t,privateUse:o}=e;n=o?t._$behaviorList:t._$pubBehaviorList}}else n=this._$behaviorList;if(n){const t=n[e];if(t)return t}}defineComponent(e){const t=e.is;return new St(t,this).definition(e).registerComponent()}defineBehavior(e){const t=e.is;return new St(t,this).definition(e).registerBehavior()}define(e){return new St(e,this)}defineWithMethodCaller(e){return new St(e,this)}_$registerComponent(e,t){this._$list[e]=t,this._$behaviorList[e]=t.behavior;const n=this._$listWaiting[e];n&&(delete this._$listWaiting[e],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:t}):n.call(t))}_$registerBehavior(e,t){this._$behaviorList[e]=t}startGroupRegister(){this._$groupingListWaiting=[]}endGroupRegister(){const e=this._$groupingListWaiting;if(e){this._$groupingListWaiting=null;for(let t=0;t<e.length;t+=1){const{waiting:n,comp:o}=e[t];n.call(o)}}}groupRegister(e){this.startGroupRegister();const t=c("group register",e,this,[]);return this.endGroupRegister(),t}exportComponent(e,t){const n=this._$list[t];if(!n)throw new Error(`There is no component "${t}" for aliasing`);this._$pubList[e]=n;const o=this._$pubListWaiting[e];o&&(delete this._$pubListWaiting[e],o.call(n))}getExportedComponent(e){return this._$pubList[e]}getExportedBehavior(e){return this._$pubBehaviorList[e]}exportBehavior(e,t){const n=this._$behaviorList[t];if(!n)throw new Error(`There is no behavior "${t}" for aliasing`);this._$pubBehaviorList[e]=n}_$componentWaitingList(e,t){const{domain:n,absPath:o}=H(e,t);let s,i,r;if(n){const e=this._$importedSpaces[n];if(!e)return null;if(i=e.space,r=!e.privateUse,r){if(i._$pubList[o])return null;s=i._$pubListWaiting}else{if(i._$list[o])return null;s=i._$listWaiting}}else{if(i=this,r=!1,this._$list[o])return null;s=this._$listWaiting}let l=s[o];return l||(l=s[o]=new z(i,r,o),l)}setComponentWaitingListener(e){this._$componentWaitingListener=e}createComponentByUrl(e,t,n,o){let s=t,i=null;const r=s.indexOf("#");r>=0&&(s=s.slice(0,r));const l=s.indexOf("?");l>=0&&(i=s.slice(l+1),s=s.slice(0,l));const a=this.getComponentByUrl(s,"");let d=null;n&&(d=Object.create(null),Object.keys(n).forEach((e=>{const t=n[e],o=this.getComponentByUrl(t,"");d[e]=o})));return bt.createWithGenericsAndContext(e,a,d,o,(e=>{if(i){let t=!1;i.split("&").forEach((n=>{const o=n.indexOf("=");if(o>=0){const s=decodeURIComponent(n.slice(0,o)),i=decodeURIComponent(n.slice(o+1));e._$dataGroup.replaceProperty(s,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))}defineTraitBehavior(e){return new G(this,e)}}let q=null;const X=()=>{if(q)return q;const e=new K;return q=e,e},Y=e=>{const t=e.str;for(;e.cur<t.length;){const n=t[e.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;e.cur+=1}return e.cur<t.length},Z=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const o=t[e.cur];if(!(o>="0"&&o<="9"))break;n+=o,e.cur+=1}if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);return parseInt(n,10)},Q=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const o=t[e.cur];if("\\"===o)if(e.cur+1===t.length);else{n+=t[e.cur+1],e.cur+=1}else if(/^[_a-zA-Z]$/.test(o))n+=o;else{if(!(o>="0"&&o<="9"))break;if(""===n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name cannot start with digits)`);n+=o}e.cur+=1}return n},J=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const o=t[e.cur];if("\\"===o)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{const o=t[e.cur+1];"."===o||"["===o||"]"===o||"\\"===o?(n+=o,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===o||"["===o)break;n+=o,e.cur+=1}}return n},ee=e=>{const t=e.str;if(Y(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];const n=Q(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (first field name illegal)`);const o=[n];for(;e.cur<t.length&&Y(e);){const n=t[e.cur];if("."===n){if(e.cur+=1,Y(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){o.push("**"),e.cur+=2;break}const n=Q(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name illegal)`);o.push(n)}else{if("["!==n)break;{e.cur+=1,Y(e);const n=Z(e);Y(e);if("]"!==t[e.cur])throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,o.push(n)}}}return o},te=e=>{const t=(e=>{const t=e.str,n=[];for(;e.cur<t.length;){const o=t[e.cur];if("."===o){e.cur+=1;const t=J(e);""!==t&&n.push(t)}else if("["===o){e.cur+=1;const o=Z(e);if("]"!==t[e.cur]&&e.cur<t.length)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,n.push(o)}else{const t=J(e);n.push(t)}}return 0===n.length&&n.push(""),n})({str:e,cur:0});return t},ne=e=>{if("string"!=typeof e)return e.map((e=>ee({str:e,cur:0})));const t={str:e,cur:0},n=(e=>{const t=[];for(t.push(ee(e)),Y(e);","===e.str[e.cur];)e.cur+=1,t.push(ee(e)),Y(e);return t})(t);if(t.cur!==e.length)throw new Error(`data path descriptor "${e}" is illegal at char ${t.cur}`);return n};var oe=Object.freeze({__proto__:null,parseMultiPaths:ne,parseSinglePath:te});const se=(e,t)=>{if("object"==typeof e&&null!==e){const n=t.get(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];t.set(e,n);for(let o=0;o<e.length;o+=1)n[o]=se(e[o],t);return n}const o={};t.set(e,o);const s=Object.keys(e);for(let n=0;n<s.length;n+=1){const i=s[n];o[i]=se(e[i],t)}return o}return"symbol"==typeof e?Symbol(e.description):e},ie=e=>{if("object"==typeof e&&null!==e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n+=1)t[n]=ie(e[n]);return t}const t={},n=Object.keys(e);for(let o=0;o<n.length;o+=1){const s=n[o];t[s]=ie(e[s])}return t}return"symbol"==typeof e?Symbol(e.description):e},re=(e,t)=>t?se(e,new WeakMap):ie(e);var le=Object.freeze({__proto__:null,deepCopy:re,simpleDeepCopy:ie});class ae{constructor(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$boundElement=e}attachChild(e){e._$mutationObserverTarget||(e._$mutationObserverTarget=new ae(e)),this._$subtreeObserversCount>0&&e._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)}detachChild(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)}updateSubtreeCount(e){this._$subtreeObserversCount+=e;this._$boundElement.childNodes.forEach((t=>{m(t)&&(t._$mutationObserverTarget||(t._$mutationObserverTarget=new ae(t)),t._$mutationObserverTarget.updateSubtreeCount(e))}))}hasSubtreeListeners(){return this._$subtreeObserversCount>0}static callAttrObservers(e,t){var n;let o=e;do{const e=o._$mutationObserverTarget;null===(n=null==e?void 0:e.attrObservers)||void 0===n||n.call(o,[t]);const s=o.parentNode;if(!s)break;if(o=s,!o._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)}static callTextObservers(e,t){var n;let o=e.parentNode;for(;o;){const e=o._$mutationObserverTarget;if(!e||0===e._$subtreeObserversCount)break;null===(n=e.textObservers)||void 0===n||n.call(o,[t]),o=o.parentNode}}static callChildObservers(e,t){var n;let o=e;do{const e=o._$mutationObserverTarget;null===(n=null==e?void 0:e.childObservers)||void 0===n||n.call(o,[t]);const s=o.parentNode;if(!s)break;if(o=s,!o._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)}static callAttachObservers(e,t){var n;const o=e._$mutationObserverTarget;null===(n=null==o?void 0:o.attachObservers)||void 0===n||n.call(e,[t])}}class de{constructor(e){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=null,this._$listener=e,this._$normalizedListener=null}static create(e){return new de(e)}observe(e,t={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1}){const n=this._$listener;if(!n)throw new Error("A MutationObserver can only observe once");let o;e._$mutationObserverTarget?o=e._$mutationObserverTarget:(o=new ae(e),e._$mutationObserverTarget=o),this._$listener=null;const s=t.subtree?n:function(e){e.target===this&&n.call(this,e)};this._$normalizedListener=s,this._$boundTarget=o,t.properties&&(o.attrObservers||(o.attrObservers=new l("attributeObserver")),o.attrObservers.add(s),this._$boundFuncArrs.push(o.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(o.childObservers||(o.childObservers=new l("childObserver")),o.childObservers.add(s),this._$boundFuncArrs.push(o.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(o.textObservers||(o.textObservers=new l("textObserver")),o.textObservers.add(s),this._$boundFuncArrs.push(o.textObservers),this._$subtreeListenersCount+=1),t.subtree&&o.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(o.attachObservers||(o.attachObservers=new l("attachObserver")),o.attachObservers.add(s),this._$boundFuncArrs.push(o.attachObservers))}disconnect(){var e;null===(e=this._$boundTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);const t=this._$boundFuncArrs;this._$boundFuncArrs=[];const n=this._$normalizedListener;n&&t.forEach((e=>{e.remove(n)}))}}const ce=Object.prototype.hasOwnProperty;var he;exports.NormalizedPropertyType=void 0,(he=exports.NormalizedPropertyType||(exports.NormalizedPropertyType={})).Invalid="invalid",he.Any="any",he.String="string",he.Number="number",he.Boolean="boolean",he.Object="object",he.Array="array",he.Function="function";const ue=(e,t)=>{const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const s=n[o];if(Object.prototype.hasOwnProperty.call(e,s))if("_"===s[0]&&O(`data field "${s}" from different behaviors is overriding or merging.`),"object"!=typeof e[s]||"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s]))e[s]=t[s];else{if(Array.isArray(e[s]))e[s]=e[s].slice();else{const t=e[s],n={},o=Object.keys(t);for(let e=0;e<o.length;e+=1){const s=o[e];n[s]=t[s]}e[s]=n}ue(e[s],t[s])}else e[s]=t[s]}},pe=e=>"string"===e||e===String?"string":"number"===e||e===Number?"number":"boolean"===e||e===Boolean?"boolean":"object"===e||e===Object?"object":"array"===e||e===Array?"array":"function"===e||e===Function?"function":"any"===e||null==e?"any":"invalid",fe=(e,t,n,o)=>{const s=n.type,i=void 0===n.default?void 0:()=>c(`Property "${t}" Default`,n.default,null,[],o||void 0),r=n.optionalTypes;if(r)for(let t=0;t<r.length;t+=1)if($e(r[t],e))return e;return"string"===s?null==e?(O(`property "${t}" received type-incompatible value: expected <String> but get null value. Used default value instead.`),void 0===i?"":i()):("object"==typeof e&&O(`property "${t}" received type-incompatible value: expected <String> but got object-typed value. Force converted.`),String(e)):"number"===s?isFinite(e)?Number(e):(O("number"==typeof e?`property "${t}" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.`:`property "${t}" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.`),void 0===i?0:i()):"boolean"===s?!!e:"array"===s?Array.isArray(e)?e:(O(`property "${t}" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.`),void 0===i?[]:i()):"object"===s?"object"==typeof e?e:(O(`property "${t}" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.`),void 0===i?null:i()):"function"===s?"function"==typeof e?e:(O(`property "${t}" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.`),void 0===i?function(){}:i()):void 0===e?void 0===i?null:i():e},$e=(e,t)=>{if("string"===e){if("string"!=typeof t)return!1}else if("number"===e){if(!Number.isFinite(t))return!1}else if("boolean"===e){if("boolean"!=typeof t)return!1}else if("object"===e){if("object"!=typeof t||Array.isArray(t))return!1}else if("array"===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if("function"===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0};var _e;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(_e||(_e={}));class ge{constructor(e){this.observerTree={sub:{}},this.observers=[],this.propFields=e}cloneSub(){const e=new ge(this.propFields);return this.observers.length>0&&(e.observerTree=ie(this.observerTree),e.observers=this.observers.slice()),e}addObserver(e,t){const n=this.observers.length;this.observers.push({path:t,f:e});for(let e=0;e<t.length;e+=1){const o=t[e];let s=this.observerTree,i=!1;for(let e=0;e<o.length;e+=1){const t=o[e];if("**"===t){i=!0;break}s.sub[t]||(s.sub[t]={sub:{}}),s=s.sub[t]}i?s.wildcard?s.wildcard.push(n):s.wildcard=[n]:s.listener?s.listener.push(n):s.listener=[n]}}}const me=(e,t,n,o)=>{const s=new Array(n.length);for(let e=0;e<n.length;e+=1){const o=n[e];let i=t;for(let e=0;e<o.length;e+=1){const t=o[e];if("**"===t)break;if("object"!=typeof i||null===i){i=void 0;break}i=i[t]}s[e]=i}c("Data Observer",o,e.getMethodCaller(),s,e||void 0)},ve=(e,t)=>{if(e.listener)for(let n=0;n<e.listener.length;n+=1){t[e.listener[n]]=!0}if(e.wildcard)for(let n=0;n<e.wildcard.length;n+=1){t[e.wildcard[n]]=!0}const n=Object.keys(e.sub);for(let o=0;o<n.length;o+=1){const s=n[o];ve(e.sub[s],t)}},be=(e,t,n)=>{let o=e,s=!0;for(let e=0;e<n.length;e+=1){const i=n[e];if(o.wildcard){const e=o.wildcard;for(let n=0;n<e.length;n+=1){t[e[n]]=!0}}if(!ce.call(o.sub,i)){s=!1;break}o=o.sub[i]}s&&ve(o,t)},Se=(e,t,n,o)=>{for(let s=0;s<e.length;s+=1){const{path:i,f:r}=e[s];t[s]&&(t[s]=!1,n&&me(n,o,i,r))}},ye=e=>e===exports.DeepCopyKind.Simple?1:e===exports.DeepCopyKind.SimpleWithRecursion?2:0;class Ce{_$generateInnerData(e){const t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){const o={},s=Object.keys(e);for(let i=0;i<s.length;i+=1){const r=s[i],l=e[r];t&&t.test(r)||(o[r]=0===n?l:2===n?re(l,!0):ie(l))}return o}return null}constructor(e,t,n,o,s,i,r){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=o,this._$propertyPassingDeepCopy=s,this._$reflectToAttributes=i&&!!e,this._$propFields=r.propFields,this._$observerTree=r.observerTree,this._$observers=r.observers,this._$observerStatus=new Array(r.observers.length),this.innerData=this._$generateInnerData(t)}static create(e){return new Ce(null,e,null,0,0,!1,new ge({}))}setUpdateListener(e){this._$updateListener=e}replaceWholeData(e){this.data=e,this.innerData=this._$generateInnerData(e)}replaceDataOnPath(e,t){this._$pendingChanges.push([e,t,void 0,void 0])}spliceArrayDataOnPath(e,t,n,o){Array.isArray(o)?this._$pendingChanges.push([e,o,null!=t?t:-1,n||0]):O(`The splice insertion must be a string (on path "${e.join(".")}"). The change is ignored.`)}replaceProperty(e,t){let n=t;return!!this._$propFields[e]&&(0!==this._$propertyPassingDeepCopy&&(n=2===this._$propertyPassingDeepCopy?re(t,!0):ie(t)),this._$pendingChanges.push([[e],n,!0,void 0]),!0)}setChanges(e){this._$pendingChanges=e}getChanges(){return this._$pendingChanges}setModelBindingListener(e,t){if(this._$modelBindingListener)this._$modelBindingListener[e]=t;else{(this._$modelBindingListener=Object.create(null))[e]=t}}applyDataUpdates(e=!1){var t;const n=this._$propFields,o=this._$comp,s=this._$pureDataPattern,i=this._$dataDeepCopy,r=!!this._$doingUpdates;let l,a;this._$observers.length>0?this._$doingUpdates?(l=this._$doingUpdates.combined,a=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},l=this._$doingUpdates.combined,a=this._$doingUpdates.prop):(l=[],a=[]);const d=this._$pendingChanges;this._$pendingChanges=[];for(let t=0;t<d.length;t+=1){const r=d[t],[h,u,p,f]=r,$=void 0!==f,_=String(h[0]),g=!!s&&s.test(_),m=n[_];let v=!0;if(m&&1===h.length){const t=this.data[_];let n,s,l;if($){if(Array.isArray(t)){const e=r,o=p;n=o>=0&&o<t.length?o:t.length,e[2]=n,t.splice(n,f,...u)}else O(`An array splice change cannot be applied to a non-array value (on path "${h.join(".")}"). The change is ignored.`);s=t}else s=fe(u,_,m,this._$comp);if(!g&&this.innerData){let e;if(0===i)r[1]=e=s;else if(void 0!==n){let t;e=this.innerData[_],r[1]=t=2===i?re(u,!0):ie(u),e.splice(n,f,...t)}else r[1]=e=2===i?re(s,!0):ie(s);this.innerData[_]=e}if(this.data[_]=s,this._$reflectToAttributes){const e=o.getBackendElement();if(e){let t=s;if(m.reflectIdPrefix){const e=o.ownerShadowRoot;if(e){const n=e.getHostNode()._$idPrefix;n&&(t=`${n}--${s}`)}}const n=_.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),i=typeof t;"boolean"===i?s?e.setAttribute(n,""):e.removeAttribute(n):"object"===i?e.setAttribute(n,JSON.stringify(t)):e.setAttribute(n,t)}}$||!0!==p?l=t!==s:(m.comparer?(r[2]=void 0,l=!!c("Property Comparer",m.comparer,o,[u,t],null==o?void 0:o.general())):l=t!==s,v=l),!g&&l&&a.push({propName:_,prop:m,oldValue:t,newValue:s,skipModelListener:e})}else{let t,n=this.data,o=_;for(let e=1;e<h.length;e+=1){const t=h[e];Number.isFinite(t)?ce.call(n,o)&&Array.isArray(n[o])||(n[o]=[]):ce.call(n,o)&&null!==n[o]&&"object"==typeof n[o]&&!Array.isArray(n[o])||(n[o]={}),n=n[o],o=t}if($){const e=n[o];if(Array.isArray(e)){const n=r,o=p;t=o>=0&&o<e.length?o:e.length,n[2]=t,e.splice(t,f,...u)}else O(`An array splice change cannot be applied to a non-array value (on path "${h.join(".")}"). The change is ignored.`)}else n[o]=u;if(!g&&this.innerData){n=this.innerData,o=_;for(let e=1;e<h.length;e+=1){const t=h[e];Number.isFinite(t)?ce.call(n,o)&&Array.isArray(n[o])||(n[o]=[]):ce.call(n,o)&&null!==n[o]&&"object"==typeof n[o]&&!Array.isArray(n[o])||(n[o]={}),n=n[o],o=t}let e;if(0===i)r[1]=e=u;else if(void 0!==t){let s;e=n[o],r[1]=s=2===i?re(u,!0):ie(u),e.splice(t,f,...s)}else r[1]=e=2===i?re(u,!0):ie(u);n[o]=e}!g&&m&&a.push({propName:_,prop:m,oldValue:void 0,newValue:u,skipModelListener:e||!1})}be(this._$observerTree,this._$observerStatus,h),!g&&v&&l.push(r),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!r){if(this._$doingUpdates){let e;do{e=this._$doingUpdates.count,Se(this._$observers,this._$observerStatus,o,this.data)}while(e!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(t=this._$updateListener)||void 0===t||t.call(this,this.innerData||this.data,l),o)for(let e=0;e<a.length;e+=1){const{propName:t,prop:n,oldValue:s,newValue:i,skipModelListener:r}=a[e];if(!r&&this._$modelBindingListener){const e=this._$modelBindingListener[t];e&&e(i)}n.observer&&c("Property Observer",n.observer,o.getMethodCaller(),[i,s],o),o._$mutationObserverTarget&&ae.callAttrObservers(o,{type:"properties",target:o,propertyName:t})}}}}var we;exports.EventBubbleStatus=void 0,(we=exports.EventBubbleStatus||(exports.EventBubbleStatus={}))[we.Normal=0]="Normal",we[we.NoDefault=1]="NoDefault";let Ne=Date.now(),Ee=Ne;var xe,ke;exports.EventMutLevel=void 0,(xe=exports.EventMutLevel||(exports.EventMutLevel={}))[xe.None=0]="None",xe[xe.Mut=1]="Mut",xe[xe.Final=2]="Final",function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.None=2]="None",e[e.Final=3]="Final",e[e.Mut=4]="Mut"}(ke||(ke={}));class Oe{constructor(){this.listeners=Object.create(null),this.captureListeners=null}addListener(e,t,n={}){const o=n.final?2:n.mutated?1:0;let s,i,r;return n.capture||n.useCapture?this.captureListeners?s=this.captureListeners:(s=Object.create(null),this.captureListeners=s):s=this.listeners,s[e]?(r=!0,i=s[e]):(r=!1,i=s[e]={mutCount:0,finalCount:0,funcArr:new a("listener")}),i.funcArr.add(t,o),2===o?(i.finalCount+=1,r&&1!==i.finalCount?0:3):1===o?(i.mutCount+=1,!r||1===i.mutCount&&0===i.finalCount?4:0):r?0:2}removeListener(e,t,n={}){const o=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!o)return 1;const s=o[e];if(!s)return 1;const i=s.funcArr.remove(t);return null===i?1:2===i?(s.finalCount-=1,0!==s.finalCount?0:s.mutCount>0?4:2):1===i?(s.mutCount-=1,0!==s.mutCount||0!==s.finalCount?0:2):0}}let Me=class e{constructor(e,t,n={}){const o=(()=>{const e=Date.now();return e<Ee&&(Ne+=e-Ee),Ee=e,e-Ne})();this._$eventName=this.type=e,this.timeStamp=o,this.detail=t,this.bubbles=n.bubbles||!1,this.composed=n.composed||!1,this._$capturePhase=n.capturePhase||!1,this._$eventBubblingControl={stopped:!1,mutated:!1,noDefault:!1},this._$originalEvent=n.originalEvent,this._$dispatched=!1,this._$handleListenerReturn=n.handleListenerReturn,n.extraFields&&Object.assign(this,n.extraFields)}getEventBubbleStatus(){return this._$eventBubblingControl.noDefault?1:0}wrapShadowedEvent(e,t,n){const o=Object.create(this);return o.target=e,o.mark=t,o.currentTarget=n,o}getEventName(){return this._$eventName}getOriginalEvent(){return this._$originalEvent}preventDefault(){this._$eventBubblingControl.noDefault=!0}defaultPrevented(){return this._$eventBubblingControl.noDefault}stopPropagation(){this._$eventBubblingControl.stopped=!0}propagationStopped(){return this._$eventBubblingControl.stopped}markMutated(){this._$eventBubblingControl.mutated=!0}mutatedMarked(){return this._$eventBubblingControl.mutated}listenerReturnHandler(){return this._$handleListenerReturn}callListener(e,t,n,o){const s=this._$eventName,i=e._$eventTarget;if(!i)return;const r=o?i.captureListeners:i.listeners;if(!r)return;const l=r[s];if(!l)return;const a=this.mutatedMarked(),d=y(n)&&n.getMethodCaller()||n,c=y(e)&&e.getMethodCaller()||e,h=this.wrapShadowedEvent(d,t,c);!1===l.funcArr.call(c,[h],(e=>!a||1!==e),y(n)?n:void 0,this._$handleListenerReturn)||l.finalCount>0?(h.stopPropagation(),h.preventDefault()):l.mutCount>0&&h.markMutated()}dispatch(e,t){if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;const n=this.composed,o=this.bubbles,s=t&&!n,i=this._$eventBubblingControl,r=(e,t)=>{const o=e=>{let s=e;const i=e.collectMarks();for(;;){if(!1===t(s,e,i))return null;let r;if(n){if(S(s))return s.getHostNode();if(null===s.containingSlot)return null;if(s.containingSlot)r=o(s.containingSlot);else for(r=s.parentNode;null==r?void 0:r._$inheritSlots;)r=r.parentNode}else r=s.parentNode;if(!r)return null;s=r}};let s=e;for(;;){const e=o(s);if(!e)break;s=e}};if(this._$capturePhase&&!i.stopped&&!s){const t=[];r(e,((e,n,o)=>{t.push([e,n,o])}));for(let e=t.length-1;e>=0;e-=1){const[n,o,s]=t[e];if(n._$eventTarget&&(this.callListener(n,s,o,!0),i.stopped))break}}if(!i.stopped&&t&&y(e)&&e._$external&&e.shadowRoot.handleEvent(t,this),!i.stopped&&!s){let t=!0;r(e,((e,n,s)=>{if(!t&&y(e)&&e._$external){const t=e.shadowRoot;t.handleEvent(t.slot,this)}return t=!1,e._$eventTarget&&this.callListener(e,s,n,!1),o&&!i.stopped}))}}static dispatchEvent(e,t){return t.dispatch(e)}static dispatchExternalEvent(e,t,n){return n.dispatch(e,t)}static triggerEvent(t,n,o,s){const i=new e(n,o,s);e.dispatchEvent(t,i)}static triggerExternalEvent(t,n,o,s,i){const r=new e(o,s,i);e.dispatchExternalEvent(t,n,r)}};var Le;!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Le||(Le={}));const De=e=>{var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace};class Ae{static _$parseSegment(e,t){const n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(e);if(!n)return null;const o=n[1].slice(1),s=n[2].split(".");return s.shift(),o||s.length?{id:o,classes:s,relation:t}:null}constructor(e){this.unions=[];const t=String(e||"").split(",");for(let e=0;e<t.length;e+=1){const n=t[e].split(/( |\t|>+)/g),o=[];let s=1,i=0;for(;i<n.length;i+=1){const e=n[i];if(!e||" "===e||"\t"===e||">>"===e)continue;if(">"===e[0]){if(1!==s)break;s=3===e.length?2:0;continue}const t=Ae._$parseSegment(e,s);if(s=1,!t)break;o.push(t)}i===n.length&&(o.length&&this.unions.push(o))}}isEmpty(){return 0===this.unions.length}static _$testSelectorSegment(e,t,n,o,s,i){var r;if(n===e)return!1;const l=o[s];let a=!0;(De(n)!==t||l.id&&l.id!==n.id)&&(a=!1);const d=l.classes;for(let e=0;a&&e<d.length;e+=1)(null===(r=n.classList)||void 0===r?void 0:r.contains(d[e]))||(a=!1);if(!a&&0===i)return!1;let c=n;if(a&&0===s){if(null===e)return!0;for(c=c.parentNode;c;c=c.parentNode)if(c===e)return!0;if(2!==i)return!1;c=n,a=!1}const h=a?l.relation:i;do{c.parentNode?c=c.parentNode:2===h?c=S(c)?c.getHostNode():null:2===i?(a=!1,c=S(c)?c.getHostNode():null):c=null,c===e&&(c=null)}while(b(c));if(!c)return!1;if(a){if(Ae._$testSelectorSegment(e,t,c,o,s-1,h))return!0;if(2!==i)return!1}return Ae._$testSelectorSegment(e,t,c,o,s,i)}testSelector(e,t){if(b(t))return!1;const n=this.unions;let o;if(o=null!==e&&De(e)||De(t),void 0===o)return!1;for(let s=0;s<n.length;s+=1){const i=n[s];if(Ae._$testSelectorSegment(e,o,t,i,i.length-1,0))return!0}return!1}query(e,t){const n=[],o=(e,t,s)=>{if(this.testSelector(e,t)){if(s)return t;n.push(t)}if(y(t)){const n=t.getShadowRoot();if(n){const t=o(e,n,s);if(t&&s)return t}}const i=t.childNodes;for(let t=0;t<i.length;t+=1){const n=i[t];if(m(n)){const t=o(e,n,s);if(t&&s)return t}}return null},s=o(e,e,t);return t?s:n}}var Te;exports.StyleSegmentIndex=void 0,(Te=exports.StyleSegmentIndex||(exports.StyleSegmentIndex={}))[Te.MAIN=0]="MAIN",Te[Te.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",Te[Te.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",Te[Te.TEMP_EXTRA=3]="TEMP_EXTRA";const Be={mode:1,destroyed:!0},Ie={mode:2,destroyed:!0},Re={mode:3,destroyed:!0};class Pe{constructor(){throw new Error("Element cannot be constructed directly")}_$initialize(e,t,n,o){this._$backendElement=t,this._$destroyOnDetach=!1,this._$nodeTreeContext=o,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotElement=null,this._$slotValues=null,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$inheritSlots=!1,this._$placeholderHandlerRemover=void 0,this._$virtual=e,this.dataset={},this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.parentIndex=-1,this.childNodes=[],this.slotNodes=void 0,this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new Oe}get $$(){return this._$backendElement}get id(){return this._$nodeId}set id(e){var t;const n=String(e);if(this._$nodeId!==n){if(this._$nodeId=n,this.ownerShadowRoot){const e=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),e.getComponentOptions().writeIdToDOM){const t=e._$idPrefix,o=t?`${t}--${n}`:n,s=this._$backendElement;s&&(3===this.getBackendMode()?s.id=o:s.setId(o))}}i.writeExtraInfoToAttr&&(null===(t=this._$backendElement)||void 0===t||t.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,attributeName:"id"})}}get slot(){return this._$nodeSlot}set slot(e){const t=String(e);if(this._$nodeSlot===t)return;if(this._$inheritSlots)throw new Error('slots-inherited nodes do not support "slot" attribute.');this._$nodeSlot=t;const n=Pe._$getParentHostShadowRoot(this.parentNode);if(n){const e=n.getSlotMode();if(3===e)throw new Error("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");if(0===e)throw new Error("nodes inside direct slots should not change slot name.");const t=Pe._$updateSubtreeSlotNodes(this.parentNode,[this],n,n,this.parentIndex);null==t||t.removeSlotNodes();const o=this.containingSlot;null==t||t.updateContainingSlot();const s=this.containingSlot;Pe.insertChildReassign(this.parentNode,this,o,s,this.parentIndex+1),null==t||t.insertSlotNodes()}this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,attributeName:"slot"})}get attributes(){const e=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((([t,n])=>{e.push({name:t,value:n})})),e}get class(){return this.classList?this.classList.getClassNames(0):""}set class(e){this.setNodeClass(e,0)}get style(){return this._$styleSegments[0]||""}set style(e){this.setNodeStyle(e,0)}asTextNode(){return null}asElement(){return this}asNativeNode(){return v(this)?this:null}asVirtualNode(){return b(this)?this:null}asInstanceOf(e){return y(this)?this.asInstanceOf(e):null}getBackendContext(){const e=this._$nodeTreeContext;return e===Be||e===Ie||e===Re?null:e}getBackendMode(){return this._$nodeTreeContext.mode}getBackendElement(){return this._$backendElement}destroyBackendElement(){this._$backendElement&&(3!==this.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null),2===this.getBackendMode()?this._$nodeTreeContext=Ie:3===this.getBackendMode()?this._$nodeTreeContext=Re:this._$nodeTreeContext=Be}destroyBackendElementOnDetach(){this._$destroyOnDetach=!0}cancelDestroyBackendElementOnDetach(){this._$destroyOnDetach=!1}isVirtual(){return this._$virtual}setNodeClass(e,t=0){var n;(null===(n=this.classList)||void 0===n?void 0:n.setClassNames(e,t))&&this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,attributeName:"class"})}toggleNodeClass(e,t,n=0){var o;(null===(o=this.classList)||void 0===o?void 0:o.toggle(e,t,n))&&this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,attributeName:"class"})}setNodeStyle(e,t=0){if(this._$styleSegments[t]===e)return;this._$styleSegments[t]=e;const n=this._$styleSegments.join(";");this._$backendElement&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):this._$backendElement.setStyle(n)),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}static checkAndCallAttached(e){!function e(t){if(m(t)&&!t._$attached){if(t._$attached=!0,y(t)){t.triggerLifetime("attached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1)),t._$mutationObserverTarget&&ae.callAttachObservers(t,{type:"attachStatus",target:t,status:"attached"});const n=t.getShadowRoot();n&&e(n)}const n=t.childNodes;for(let t=0;t<n.length;t+=1)e(n[t])}}(e)}static checkAndCallDetached(e){const t=[];!function e(n){if(n._$destroyOnDetach&&t.push(n),m(n)&&n._$attached)if(y(n)&&n.triggerLifetime("beforeDetach",[]),n.childNodes.forEach(e),y(n)){const t=n._$placeholderHandlerRemover;t&&t();const o=n.getShadowRoot();o&&e(o),n._$attached=!1,n.triggerLifetime("detached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&ae.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1}(e);for(let e=0;e<t.length;e+=1)t[e].destroyBackendElement()}static checkAndCallMoved(e){!function e(t){if(m(t)&&t._$attached&&(t.childNodes.forEach(e),y(t))){const n=t.getShadowRoot();n&&e(n),t.triggerLifetime("moved",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1))}}(e)}static checkChildObservers(e,t,n){var o;const s=e._$mutationObserverTarget;if(s&&(!(null===(o=s.childObservers)||void 0===o?void 0:o.empty)||s.hasSubtreeListeners())){const o=[n];let s;s="add"===t?{type:"childList",target:e,addedNodes:o}:"remove"===t?{type:"childList",target:e,removedNodes:o}:{type:"childList",target:e,addedNodes:o,removedNodes:o},ae.callChildObservers(e,s)}}static hasSubtreeMutationObservers(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1}static _$insertChildReassignSlot(e,t,n,o){if(n)if(o){const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const s=e[t];Pe._$spliceSlotNodes(n,0,1,void 0),Pe._$spliceSlotNodes(o,-1,0,[s]),Pe._$updateContainingSlot(s,o),s._$inheritSlots||Pe.insertChildReassign(s.parentNode,s,n,o,s.parentIndex)}}else{const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const s=e[t];Pe._$spliceSlotNodes(n,0,1,void 0),Pe._$updateContainingSlot(s,o),s._$inheritSlots||Pe.insertChildReassign(s.parentNode,s,n,null,s.parentIndex)}}else{const n=[];e.forEachNodeInSpecifiedSlot(null,(e=>{if(null!==t){if((m(e)?e._$nodeSlot:"")!==t)return}n.push(e)}));for(let e=0;e<n.length;e+=1){const t=n[e];Pe._$spliceSlotNodes(o,-1,0,[t]),Pe._$updateContainingSlot(t,o),t._$inheritSlots||Pe.insertChildReassign(t.parentNode,t,null,o,t.parentIndex)}}}static insertChildReassign(e,t,n,o,s){if(1!==e.getBackendMode()){if(n)if(o&&3===e.getBackendMode());else{const o=Pe.findNearestNonVirtual(n);if(o){const n=Pe.countNonVirtual(t);if(n){const[t,s]=n;if(3===e.getBackendMode()){const e=t._$backendElement;for(let t=1;t<s;t+=1){const t=e.nextSibling;t&&o.removeChild(t)}s>0&&o.removeChild(e)}else o.spliceRemove(t._$backendElement,s)}}}o&&Pe.insertChildComposed(e,t,void 0,!1,s)}else t._$backendElement.reassignContainingSlot(n?n._$backendElement:null,o?o._$backendElement:null)}static findNearestNonVirtual(e){let t=e;for(;null==t?void 0:t._$virtual;)t=S(t)?t.getHostNode():void 0===t.containingSlot?t.parentNode:t.containingSlot;return t?t._$backendElement:null}static countNonVirtual(e){let t=null,n=0;const o=e=>{0===n&&(t=e),n+=1};var s;return m(s=e)&&s._$virtual?s.forEachNonVirtualComposedChild(o):o(s),t?[t,n]:null}static forEachNodeInSlot(e,t){const n=e=>{if(!1===t(e,e.containingSlot))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!0};return n(e)}static forEachNodeInSpecificSlot(e,t,n){const o=e=>{if(e.containingSlot===t&&!1===n(e))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!o(t[e]))return!1;return!0}return!0};return o(e)}static forEachSlotContentInSlot(e,t){const n=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!1!==t(e,e.containingSlot)};return n(e)}static forEachSlotContentInSpecificSlot(e,t,n){const o=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!o(t[e]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return o(e)}static _$findFirstNonVirtualChild(e,t){const n=null!==e._$slotName,o=n?e.slotNodes:e.childNodes;if(t>=0&&t<o.length)for(let e=t;e<o.length;e+=1){let t=null;const s=e=>(t=e,!1),i=e=>{if(!n&&e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!1===i(t[e]))return!1}return e._$virtual?e.forEachNonVirtualComposedChild(s):s(e)};if(i(o[e]),t)return t}const s=e=>{if(!e._$virtual)return null;const t=e.containingSlot;if(null===t)return null;if(void 0!==t)return Pe._$findFirstNonVirtualChild(t,e.slotIndex+1);if(S(e))return s(e.getHostNode());const n=e.parentNode;return n?Pe._$findFirstNonVirtualChild(n,e.parentIndex+1):null};return s(e)}static _$findFirstNonVirtualSibling(e,t){const n=e.containingSlot;if(null===n)return null;if(void 0!==n){if(!n._$virtual)return null;if(void 0!==e.slotIndex)return Pe._$findFirstNonVirtualChild(n,e.slotIndex+1);const o=Pe._$findSlotNodeInsertPosition(n,e,t);return Pe._$findFirstNonVirtualChild(n,o)}let o=e;if(S(e))return o=e.getHostNode(),o._$virtual?Pe._$findFirstNonVirtualChild(o,o.parentIndex+1):null;const s=o.parentNode;return s?Pe._$findFirstNonVirtualChild(s,t):null}static insertChildComposed(e,t,n,o,s){var r,l,a;let d=!1,c=e;for(;null==c?void 0:c._$inheritSlots;)d=!0,c=c.parentNode;if(!c)return;const h=c,u=h._$nodeTreeContext;if(!u)return;let p;y(h)?h._$external?p=h.shadowRoot.slot:d=!0:(h._$virtual&&(d=!0),p=Pe.findNearestNonVirtual(h));let f=null;const $=(i,r)=>{const l=i||(r?Pe.findNearestNonVirtual(r):null);if(3!==e.getBackendMode()&&!l)return;let a=0,c=null,h=null,p=null;if(t){const e=f||(3===u.mode?u.document.createDocumentFragment():u.createFragment());f=e;const n=t=>{e.appendChild(t._$backendElement),h=e};Pe.forEachNodeInSpecificSlot(t,r,(e=>{p||(p=e),e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)}))}if(3!==e.getBackendMode()||l){if((n||d)&&(o&&n?(Pe.forEachSlotContentInSpecificSlot(n,r,(e=>{if(m(e)){const t=Pe.countNonVirtual(e);t&&(c||(c=t[0]),a+=t[1])}else c||(c=e),a+=1;return!0})),0===a&&h&&p&&(c=Pe._$findFirstNonVirtualSibling(void 0===r?t:p,s+1))):h&&p&&(c=Pe._$findFirstNonVirtualSibling(void 0===r?t:p,s))),h)if(c)if(3===u.mode){const e=c._$backendElement;l.insertBefore(h,e);for(let t=1;t<a;t+=1){const t=e.nextSibling;t&&l.removeChild(t)}a>0&&l.removeChild(e)}else l.spliceBefore(c._$backendElement,a,h);else 3===u.mode?l.appendChild(h):l.spliceAppend(h);else if(a>0)if(3===u.mode){const e=c._$backendElement;for(let t=1;t<a;t+=1){const t=e.nextSibling;t&&l.removeChild(t)}a>0&&l.removeChild(e)}else l.spliceRemove(c._$backendElement,a)}else f=null};if(void 0!==p)null===p||(d||m(t)&&t._$virtual||m(n)&&n._$virtual?$(p,void 0):o?t?p.replaceChild(t._$backendElement,n._$backendElement):p.removeChild(n._$backendElement):n?p.insertBefore(t._$backendElement,n._$backendElement):p.appendChild(t._$backendElement));else if(t&&t._$inheritSlots||o&&n&&n._$inheritSlots){const e=new Set;o&&n&&Pe.forEachSlotContentInSlot(n,((t,n)=>{e.add(n)})),t&&Pe.forEachSlotContentInSlot(t,((t,n)=>{e.add(n)})),e.forEach((e=>$(null,e)))}else t&&$(null,t.containingSlot),!o||!n||t&&n.containingSlot===t.containingSlot||$(null,n.containingSlot);3!==u.mode&&f&&f.release(),i.writeExtraInfoToAttr&&(o&&m(n)&&(null===(r=n._$backendElement)||void 0===r||r.removeAttribute("exparser:info-in-slot-of")),m(t)&&(y(e)?null===(l=t._$backendElement)||void 0===l||l.setAttribute("exparser:info-in-slot-of",e._$componentInstanceId):null===(a=t._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")))}static _$updateSubtreeSlotsInsertion(e,t,n,o,s){if(!t||!n)return;let i=e,r=null,l=null;const a=(e,t)=>{if(e._$subtreeSlotStart){const n=e.childNodes;let o=t+1,s=n[o];for(;s&&!s._$subtreeSlotStart;)o+=1,s=n[o];return void(s?(l=s._$subtreeSlotStart,r=l.prev):(r=e._$subtreeSlotEnd,r&&(l=r.next)))}let n=e,o=e.parentNode;for(;o&&!o._$subtreeSlotStart;)n=o,o=o.parentNode;o&&a(o,n.parentIndex)};for(a(i,o),r&&(r.next=t,t.prev=r),l&&(l.prev=n,n.next=l);i;){let e=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===l?(i._$subtreeSlotStart=t,e=!0):i._$subtreeSlotEnd===r&&(i._$subtreeSlotEnd=n,e=!0):(i._$subtreeSlotStart=t,i._$subtreeSlotEnd=n,e=!0),!e||!i.parentNode)break;i=i.parentNode}const d=i.ownerShadowRoot;(null==d?void 0:d.isConnected(i))&&d._$applySlotsInsertion(t,n,s)}static _$updateSubtreeSlotsRemoval(e,t,n,o){if(!t||!n)return;let s=e;const i=t.prev,r=n.next;for(i&&(i.next=r,t.prev=null),r&&(r.prev=i,n.next=null);s;){let e=!1;if(s._$subtreeSlotStart===t&&s._$subtreeSlotEnd===n&&(s._$subtreeSlotStart=s._$subtreeSlotEnd=null,e=!0),s._$subtreeSlotStart===t?(s._$subtreeSlotStart=r,e=!0):s._$subtreeSlotEnd===n&&(s._$subtreeSlotEnd=i,e=!0),!e||!s.parentNode)break;s=s.parentNode}const l=s.ownerShadowRoot;(null==l?void 0:l.isConnected(s))&&l._$applySlotsRemoval(t,n,o)}static _$updateSubtreeSlotsReplacement(e,t,n,o,s,i,r){if(!t||!n)return void Pe._$updateSubtreeSlotsRemoval(e,o,s,r);if(!o||!s)return void Pe._$updateSubtreeSlotsInsertion(e,t,n,i,r);let l=e;const a=o.prev,d=s.next;for(a&&(a.next=t,t.prev=a,o.prev=null),d&&(d.prev=n,n.next=d,s.next=null);l;){let e=!1;if(l._$subtreeSlotStart===o&&(l._$subtreeSlotStart=t,e=!0),l._$subtreeSlotEnd===s&&(l._$subtreeSlotEnd=n,e=!0),!e||!l.parentNode)break;l=l.parentNode}const c=l.ownerShadowRoot;(null==c?void 0:c.isConnected(l))&&(c._$applySlotsRemoval(o,s,!1),c._$applySlotsInsertion(t,n,r))}static _$updateSubtreeSlotNodes(e,t,n,o,s){if(!n&&!o)return;const i=null==n?void 0:n.getSlotMode(),r=null==o?void 0:o.getSlotMode();if(!(void 0!==i&&0!==i||void 0!==r&&0!==r))return;if(!(void 0!==i&&1!==i||void 0!==r&&1!==r)){let e=-1,i=0,r=-1;const l=[],a=t[0].containingSlot,d=null==n?void 0:n.getContainingSlot(t[0]);for(let n=0;n<t.length;n+=1){const o=t[n];Pe.forEachNodeInSlot(o,(t=>{a&&(i?i+=1:(e=t.slotIndex,i=1)),l.push(t)}))}if(d&&l.length){const e=l[0];r=Pe._$findSlotNodeInsertPosition(d,e,s)}return{updateContainingSlot:()=>{for(let e=l.length-1;e>=0;e-=1){const t=l[e];Pe._$updateContainingSlot(t,d)}},removeSlotNodes:()=>{o&&a&&i&&Pe._$spliceSlotNodes(a,e,i,void 0)},insertSlotNodes:()=>{n&&d&&l.length&&Pe._$spliceSlotNodes(d,r,0,l)}}}const l=new Map,a=new Map,d=[];for(let e=0;e<t.length;e+=1){const o=t[e];Pe.forEachNodeInSlot(o,((e,t)=>{const o=0!==i?null==n?void 0:n.getContainingSlot(e):void 0;if(t){const n=a.get(t);n?n.count+=1:a.set(t,{start:e.slotIndex,count:1})}if(o){const t=l.get(o);t?t.nodes.push(e):l.set(o,{nodes:[e],insertPos:-1})}d.push([e,o])}))}if(n&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n}]=t.value,o=n[0];t.value[1].insertPos=Pe._$findSlotNodeInsertPosition(e,o,s)}}return{updateContainingSlot:()=>{for(let e=d.length-1;e>=0;e-=1){const[t,n]=d[e];Pe._$updateContainingSlot(t,n)}},removeSlotNodes:()=>{if(o&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{start:n,count:o}]=t.value;Pe._$spliceSlotNodes(e,n,o,void 0)}}},insertSlotNodes:()=>{if(n&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n,insertPos:o}]=t.value;Pe._$spliceSlotNodes(e,o,0,n)}}}}}static insertChildSingleOperation(e,t,n,o){var s,i,r,l,a;if(t&&e.ownerShadowRoot!==t.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");let d=n;const c=d>=0?e.childNodes[d]:void 0;let h,u;if(h=!!o&&(!!c&&t!==c),!h&&!t)return;if(t){if(u=t.parentNode,u){const n=u.childNodes,o=t.parentIndex;n.splice(o,1);for(let e=o;e<n.length;e+=1)n[e].parentIndex=e;t.parentIndex=-1,u===e&&o<d&&(d-=1);const i=Pe._$updateSubtreeSlotNodes(e,[t],null,Pe._$getParentHostShadowRoot(u),d);null==i||i.removeSlotNodes(),3===e.getBackendMode()||(1===e.getBackendMode()?null===(s=u._$backendElement)||void 0===s||s.removeChild(t._$backendElement,o):Pe.insertChildComposed(u,null,t,!0,o)),null==i||i.updateContainingSlot()}t.parentNode=e,m(t)&&u!==e&&(u&&(null===(i=u._$mutationObserverTarget)||void 0===i||i.detachChild(t)),null===(r=e._$mutationObserverTarget)||void 0===r||r.attachChild(t))}else u=null;const p=Pe._$getParentHostShadowRoot(e),f=t?Pe._$updateSubtreeSlotNodes(e,[t],p,null,d):null,$=c&&h?Pe._$updateSubtreeSlotNodes(e,[c],null,p,d):null;if(null==f||f.updateContainingSlot(),null==$||$.removeSlotNodes(),1===e.getBackendMode()){if(e._$backendElement)if(h)t?e._$backendElement.replaceChild(t._$backendElement,c._$backendElement,d):e._$backendElement.removeChild(c._$backendElement,d);else{const n=e.childNodes[d];n?e._$backendElement.insertBefore(t._$backendElement,n._$backendElement,d):e._$backendElement.appendChild(t._$backendElement)}}else Pe.insertChildComposed(e,t,c,h,d);null==f||f.insertSlotNodes(),null==$||$.updateContainingSlot(),h&&c&&(m(c)&&(null===(l=e._$mutationObserverTarget)||void 0===l||l.detachChild(c)),c.parentNode=null,c.parentIndex=-1);const _=e.childNodes;if(t)if(d<0)_.push(t),t.parentIndex=_.length-1;else if(h)_[d]=t,t.parentIndex=d;else{_.splice(d,0,t);for(let e=d;e<_.length;e+=1)_[e].parentIndex=e}else if(h){_.splice(d,1);for(let e=d;e<_.length;e+=1)_[e].parentIndex=e}const g=t?t._$subtreeSlotStart:null,v=t?t._$subtreeSlotEnd:null,b=c?c._$subtreeSlotStart:null,S=c?c._$subtreeSlotEnd:null;t?(u&&Pe._$updateSubtreeSlotsRemoval(u,g,v,!0),h?Pe._$updateSubtreeSlotsReplacement(e,g,v,b,S,d,!!u):Pe._$updateSubtreeSlotsInsertion(e,g,v,d,!!u)):h&&c&&Pe._$updateSubtreeSlotsRemoval(e,b,S,!1),null===(a=e.ownerShadowRoot)||void 0===a||a._$markIdCacheDirty(),h&&(Pe.checkAndCallDetached(c),Pe.checkChildObservers(e,"remove",c)),t&&((null==u?void 0:u._$attached)?e._$attached?Pe.checkAndCallMoved(t):Pe.checkAndCallDetached(t):e._$attached&&Pe.checkAndCallAttached(t),u===e?Pe.checkChildObservers(e,"move",t):(u&&Pe.checkChildObservers(u,"remove",t),Pe.checkChildObservers(e,"add",t)))}static insertChildBatchRemoval(e,t,n){var o,s;const i=e.childNodes[t];let r=e;for(;null==r?void 0:r._$inheritSlots;)r=r.parentNode;const l=y(r)&&!r._$external?r.shadowRoot:null,a=e.childNodes,d=a.splice(t,n);for(let e=t;e<a.length;e+=1)a[e].parentIndex=e;const c=Pe._$updateSubtreeSlotNodes(e,d,null,l,t);if(null==c||c.removeSlotNodes(),1===e.getBackendMode())e._$backendElement&&e._$backendElement.spliceRemove(i._$backendElement,n);else for(let t=n-1;t>=0;t-=1)Pe.insertChildComposed(e,null,d[t],!0,t);for(let t=0;t<n;t+=1){const n=d[t];n.parentNode=null,n.parentIndex=-1,m(n)&&(null===(o=e._$mutationObserverTarget)||void 0===o||o.detachChild(n))}null==c||c.updateContainingSlot();let h=null,u=null;for(let e=0;e<n;e+=1){const t=d[e];h||(h=t._$subtreeSlotStart),t._$subtreeSlotEnd&&(u=t._$subtreeSlotEnd)}Pe._$updateSubtreeSlotsRemoval(e,h,u,!1),null===(s=e.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty();for(let t=0;t<n;t+=1){const n=d[t];Pe.checkAndCallDetached(n),Pe.checkChildObservers(e,"remove",n)}}static insertChildBatchInsertion(e,t,n){var o,s;const i=n>=0?e.childNodes[n]:void 0;let r=e;for(;null==r?void 0:r._$inheritSlots;)r=r.parentNode;const l=y(r)&&!r._$external?r.shadowRoot:null;let a;if(1===e.getBackendMode()&&t.length>=5){a=e.getBackendContext().createFragment()}else a=null;for(let n=0;n<t.length;n+=1){const s=t[n];if(e.ownerShadowRoot!==s.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(s.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(s.parentNode=e,m(s)&&(null===(o=e._$mutationObserverTarget)||void 0===o||o.attachChild(s)),1===e.getBackendMode()&&a){const e=s._$backendElement;a.appendChild(e)}}const d=Pe._$updateSubtreeSlotNodes(e,t,l,null,n);if(null==d||d.updateContainingSlot(),1===e.getBackendMode()){if(e._$backendElement)if(a)i?e._$backendElement.spliceBefore(i._$backendElement,0,a):e._$backendElement.spliceAppend(a),a.release();else if(i)for(let n=0;n<t.length;n+=1){const o=t[n];e._$backendElement.insertBefore(o._$backendElement,i._$backendElement)}else for(let n=0;n<t.length;n+=1){const o=t[n];e._$backendElement.appendChild(o._$backendElement)}}else{const o=n>=0?n:e.childNodes.length;for(let n=0;n<t.length;n+=1){const s=t[n];Pe.insertChildComposed(e,s,i,!1,o)}}null==d||d.insertSlotNodes();const c=e.childNodes;if(i){c.splice(n,0,...t);for(let e=n;e<c.length;e+=1)c[e].parentIndex=e}else{c.push(...t);for(let e=c.length-t.length;e<c.length;e+=1)c[e].parentIndex=e}let h=null,u=null;for(let e=0;e<t.length;e+=1){const n=t[e],o=n._$subtreeSlotStart,s=n._$subtreeSlotEnd;o&&(u?(o.prev=u,u.next=o,u=s):(h=o,u=s))}Pe._$updateSubtreeSlotsInsertion(e,h,u,n+t.length-1,!1),null===(s=e.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty();for(let n=0;n<t.length;n+=1){const o=t[n];e._$attached&&Pe.checkAndCallAttached(o),Pe.checkChildObservers(e,"add",o)}}static insertChildPlaceholderReplace(e,t,n){var o,s,i,r,l,a;if(n&&e.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(n.parentNode)throw new Error("Cannot replace with the node which already has a parent.");const d=e.childNodes[t];if(!m(d))throw new Error("Cannot replace on text nodes.");if(null!==d._$slotName||null!==n._$slotName)throw new Error("Cannot replace on slot nodes.");if(d===n)return;let c;if(1===e.getBackendMode()){c=e.getBackendContext().createFragment()}else c=null;const h=d.childNodes;if(1===e.getBackendMode()&&h.length>0){const e=d._$backendElement;e&&e.spliceRemove(h[0]._$backendElement,h.length)}for(let t=0;t<h.length;t+=1){const i=h[t];if(3===e.getBackendMode());else if(1===e.getBackendMode()){const e=i._$backendElement;c.appendChild(e)}else Pe.insertChildComposed(d,null,i,!0,t);i.parentNode=n,m(i)&&(null===(o=d._$mutationObserverTarget)||void 0===o||o.detachChild(i),null===(s=e._$mutationObserverTarget)||void 0===s||s.attachChild(i))}d.childNodes=[],d.parentNode=null,d.parentIndex=-1,n.parentNode=e;const u=d.containingSlot,p=d.slotIndex;void 0!==u&&(Pe._$updateContainingSlot(n,u),u&&Pe._$spliceSlotNodes(u,p,1,void 0));const f=h.length?Pe._$updateSubtreeSlotNodes(n,h,Pe._$getParentHostShadowRoot(n),Pe._$getParentHostShadowRoot(d),0):null;if(null==f||f.updateContainingSlot(),null==f||f.removeSlotNodes(),e.childNodes[t]=n,n.parentIndex=t,1===e.getBackendMode())e._$backendElement&&(e._$backendElement.replaceChild(n._$backendElement,d._$backendElement,t),null===(i=n._$backendElement)||void 0===i||i.spliceAppend(c)),c.release();else{Pe.insertChildComposed(e,n,d,!0,t);for(let e=0;e<h.length;e+=1){const t=h[e];Pe.insertChildComposed(n,t,void 0,!1,e)}}null==f||f.insertSlotNodes(),void 0!==u&&(Pe._$updateContainingSlot(d,void 0),u&&Pe._$spliceSlotNodes(u,p,0,[n])),n._$subtreeSlotStart=d._$subtreeSlotStart,n._$subtreeSlotEnd=d._$subtreeSlotEnd,null===(r=e._$mutationObserverTarget)||void 0===r||r.detachChild(d),null===(l=e._$mutationObserverTarget)||void 0===l||l.attachChild(n),n.childNodes.push(...h);for(let e=n.childNodes.length-h.length;e<n.childNodes.length;e+=1)n.childNodes[e].parentIndex=e;if(null===(a=e.ownerShadowRoot)||void 0===a||a._$markIdCacheDirty(),e._$attached){Pe.checkAndCallDetached(d),Pe.checkChildObservers(e,"remove",d),Pe.checkAndCallAttached(n),Pe.checkChildObservers(e,"add",n);for(let t=0;t<h.length;t+=1){const n=h[t];Pe.checkAndCallMoved(n),Pe.checkChildObservers(e,"move",n)}}}appendChild(e){Pe.insertChildSingleOperation(this,e,this.childNodes.length,!1)}insertChildAt(e,t){Pe.insertChildSingleOperation(this,e,t,!1)}insertBefore(e,t){const n=t?t.parentIndex:-1;Pe.insertChildSingleOperation(this,e,n,!1)}removeChildAt(e){Pe.insertChildSingleOperation(this,null,e,!0)}removeChild(e){const t=e.parentIndex;Pe.insertChildSingleOperation(this,null,t,!0)}replaceChildAt(e,t){Pe.insertChildSingleOperation(this,e,t,!0)}replaceChild(e,t){const n=t.parentIndex;Pe.insertChildSingleOperation(this,e,n,!0)}insertChildren(e,t){Pe.insertChildBatchInsertion(this,e,t)}removeChildren(e,t){Pe.insertChildBatchRemoval(this,e,t)}selfReplaceWith(e){const t=this.parentNode;t&&Pe.insertChildPlaceholderReplace(t,this.parentIndex,e)}static _$generateIdMap(e){const t=Object.create(null);return function e(n){if(m(n)){const o=n._$nodeId;o&&(t[o]||(t[o]=n)),n.childNodes.forEach(e)}}(e),t}triggerEvent(e,t,n){Me.triggerEvent(this,e,t,n)}dispatchEvent(e){Me.dispatchEvent(this,e)}_$setListenerStats(e,t,n={}){if(!this._$backendElement)return;const o=!!n.capture||!!n.useCapture;let s;switch(t){case 2:s=0;break;case 4:s=1;break;case 3:s=2;break;default:return}this._$nodeTreeContext&&(3===this.getBackendMode()?this._$nodeTreeContext.setListenerStats(this._$backendElement,e,o,s):this._$backendElement.setListenerStats(e,o,s))}addListener(e,t,n){const o=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,o,n),y(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])}removeListener(e,t,n){const o=this._$eventTarget.removeListener(e,t,n);1!==o&&(this._$setListenerStats(e,o,n),y(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,e,t,n]))}getAttribute(e){return this._$nodeAttributes&&Object.prototype.hasOwnProperty.call(this._$nodeAttributes,e)?this._$nodeAttributes[e]:null}updateAttribute(e,t){this.setAttribute(e,t)}setAttribute(e,t){let n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[e]=t;const o=this._$backendElement;o&&(3===this.getBackendMode()?!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t||null==t?"":String(t)):o.setAttribute(e,t))}removeAttribute(e){this._$nodeAttributes&&delete this._$nodeAttributes[e];const t=this._$backendElement;t&&t.removeAttribute(e)}setDataset(e,t){this.dataset[e]=t,1===this.getBackendMode()&&this._$backendElement.setDataset(e,t)}setMark(e,t){if(this._$marks)this._$marks[e]=t;else{const n={};n[e]=t,this._$marks=n}}collectMarks(){const e={};let t;for(t=this;t;t=t.parentNode){const n=t._$marks;n&&Object.keys(n).forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n[t])}))}return e}static replaceDocumentElement(e,t,n){if(e._$attached)throw new Error("An attached element cannot be attached again");e._$backendElement&&t.replaceChild(e._$backendElement,n),Pe.checkAndCallAttached(e)}static pretendAttached(e){e._$attached||Pe.checkAndCallAttached(e)}static pretendDetached(e){e._$attached&&Pe.checkAndCallDetached(e)}static isAttached(e){return e._$attached}static setSlotName(e,t){var n;if(e._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");const o=t?String(t):"",s=e._$slotName;if(s===o)return;const i=null===s;e._$slotName=o,i&&(e._$subtreeSlotStart=e._$subtreeSlotEnd={value:e,prev:null,next:null}),1===e.getBackendMode()&&(null===(n=e._$backendElement)||void 0===n||n.setSlotName(o));const r=e.ownerShadowRoot;if(r)if(i){3===r.getSlotMode()&&(e._$slotValues=Object.create(null)),e.slotNodes=[];const t=e.parentNode;t&&Pe._$updateSubtreeSlotsInsertion(t,e._$subtreeSlotStart,e._$subtreeSlotEnd,e.parentIndex,!1)}else r.isConnected(e)&&r._$applySlotRename(e,o,s)}static getSlotName(e){const t=e._$slotName;return null===t?void 0:t}static setInheritSlots(e){if(!e._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");if(1===e.getBackendMode()){const t=e._$backendElement;t&&t.setInheritSlots()}e._$inheritSlots=!0}static getInheritSlots(e){return e._$inheritSlots}isInheritSlots(){return this._$inheritSlots}static setSlotElement(e,t){if(e._$slotElement===t)return;e._$slotElement=t;const n=Pe._$getParentHostShadowRoot(e.parentNode);if(n){const t=Pe._$updateSubtreeSlotNodes(e.parentNode,[e],n,n,e.parentIndex),o=e.containingSlot;null==t||t.updateContainingSlot(),null==t||t.removeSlotNodes();const s=e.containingSlot,i=e=>{if(m(e)&&e._$inheritSlots)for(let t=0;t<e.childNodes.length;t+=1)i(e.childNodes[t]);else Pe.insertChildReassign(e.parentNode,e,o,s,e.parentIndex)};i(e),null==t||t.insertSlotNodes()}}static _$updateContainingSlot(e,t){var n;e.containingSlot=t,1===(null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getBackendMode())&&e._$backendElement.setContainingSlot(t?t._$backendElement:t)}static _$spliceSlotNodes(e,t,n,o){const s=e.slotNodes=e.slotNodes||[],i=t>=0&&t<s.length;if(null==o?void 0:o.length)if(i){for(let e=t;e<t+n;e+=1)s[e].slotIndex=void 0;s.splice(t,n,...o);for(let e=t;e<s.length;e+=1)s[e].slotIndex=e}else{const e=s.length;s.push(...o);for(let t=e;t<s.length;t+=1)s[t].slotIndex=t}else if(n){for(let e=t;e<t+n;e+=1)s[e].slotIndex=void 0;s.splice(t,n);for(let e=t;e<s.length;e+=1)s[e].slotIndex=e}if(1===e.getBackendMode())if(null==o?void 0:o.length){const s=e._$nodeTreeContext.createFragment();for(let e=0;e<o.length;e+=1)s.appendChild(o[e]._$backendElement);i?e._$backendElement.spliceBeforeSlotNodes(t,n,s):e._$backendElement.spliceAppendSlotNodes(s),s.release()}else n&&e._$backendElement.spliceRemoveSlotNodes(t,n)}static _$findSlotNodeInsertPosition(e,t,n){const o=e.ownerShadowRoot.getHostNode(),s=e=>{let t=0,n=e;for(;n&&n!==o;)t+=1,n=n.parentNode;return t},i=s(t),r=(e,t,n,o,s,i,l)=>{if(e===o)return 0;if(e.parentNode===o.parentNode)return t-(-1===s?l:s);if(i<n){const t=e.parentNode;return r(t,t.parentIndex,n-1,o,s,i,l)}const a=n<i?e:e.parentNode,d=n<i?n:n-1,c=o.parentNode,h=i-1,u=r(a,a.parentIndex,d,c,c.parentIndex,h,l);return 0===u?-1:u},l=e.slotNodes;let a=l.length-1;for(;a>=0;a-=1){const e=l[a];if(r(e,e.parentIndex,s(e),t,t.parentIndex,i,n>=0?n-.5:l.length)<0)break}return a+1}getComposedParent(){if(S(this))return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}getComposedChildren(){const e=[];return this.forEachComposedChild((t=>{e.push(t)})),e}forEachComposedChild(e){if(this._$inheritSlots)return!0;if(y(this)&&!this._$external)return!1!==e(this.shadowRoot);if(null!==this._$slotName){const t=this.ownerShadowRoot;return!t||t.forEachNodeInSpecifiedSlot(this,e)}const t=n=>{for(let o=0;o<n.length;o+=1){const s=n[o];if(!1===e(s))return!1;if(s._$inheritSlots&&!t(s.childNodes))return!1}return!0};return t(this.childNodes)}forEachNonVirtualComposedChild(e){if(this._$inheritSlots)return!0;const t=t=>t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t);if(y(this)&&!this._$external)return t(this.shadowRoot);if(null!==this._$slotName){const e=this.ownerShadowRoot;return!e||e.forEachSlotContentInSpecifiedSlot(this,t)}const n=e=>{for(let o=0;o<e.length;o+=1){const s=e[o];if(!t(s))return!1;if(s._$inheritSlots&&!n(s.childNodes))return!1}return!0};return n(this.childNodes)}static parseSelector(e){return new Ae(e)}querySelector(e){return(e instanceof Ae?e:new Ae(e)).query(this,!0)}querySelectorAll(e){return(e instanceof Ae?e:new Ae(e)).query(this,!1)}static matchSelector(e,t){return(e instanceof Ae?e:new Ae(e)).testSelector(null,t)}matchSelector(e,t){return(e instanceof Ae?e:new Ae(e)).testSelector(this,t)}getBoundingClientRect(e){var t;const n=this._$backendElement;if(n)if(3===this.getBackendMode()){const o=n,s=(null===(t=o.getBoundingClientRect)||void 0===t?void 0:t.call(o))||{left:0,top:0,width:0,height:0};setTimeout((()=>{e(s)}),0)}else{const t=n;t.getBoundingClientRect?t.getBoundingClientRect(e):setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}else setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=t,o={scrollLeft:n.scrollLeft||0,scrollTop:n.scrollTop||0,scrollWidth:n.scrollWidth||0,scrollHeight:n.scrollHeight||0};setTimeout((()=>{e(o)}),0)}else{const n=t;n.getScrollOffset?n.getScrollOffset(e):setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}else setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}createIntersectionObserver(e,t,n,o){const s=this._$backendElement;if(s){if(e&&!e._$backendElement)return null;if(3===this.getBackendMode()){const i=this._$nodeTreeContext;return i&&i.createIntersectionObserver?i.createIntersectionObserver(s,(null==e?void 0:e._$backendElement)||null,t,n,o):null}const i=s;return i.createIntersectionObserver?i.createIntersectionObserver((null==e?void 0:e._$backendElement)||null,t,n,o):null}return null}getContext(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=this._$nodeTreeContext;(null==n?void 0:n.getContext)?n.getContext(t,e):e(null)}else{const n=t;n.getContext?n.getContext(e):e(null)}}}var je;Pe.isElement=m,Pe._$getParentHostShadowRoot=e=>{let t=e;for(;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return y(t)&&!t._$external?t.shadowRoot:null},Pe.prototype[u]=!0,exports.RelationType=void 0,(je=exports.RelationType||(exports.RelationType={}))[je.Ancestor=0]="Ancestor",je[je.Descendant=1]="Descendant",je[je.ParentNonVirtualNode=2]="ParentNonVirtualNode",je[je.ChildNonVirtualNode=3]="ChildNonVirtualNode",je[je.ParentComponent=4]="ParentComponent",je[je.ChildComponent=5]="ChildComponent";const Ue=(e,t,n,o)=>{const s=e=>"function"==typeof e?e:(void 0!==e&&O(`the "${n}" relation listener is not a function (when preparing behavior "${t}").`),null);let i;if("parent"===o.type)i=4;else if("child"===o.type)i=5;else if("parent-common-node"===o.type)i=2;else if("child-common-node"===o.type)i=3;else if("ancestor"===o.type)i=0;else{if("descendant"!==o.type){const e=o.type;return O(`the "${n}" relation has an invalid relation type "${e}" (when preparing behavior "${t}").`),null}i=1}let r=null;if(o.target instanceof gt)r=o.target.behavior;else if(o.target instanceof yt||o.target instanceof G)r=o.target;else{const s=String(o.target||n),i=e.getComponentByUrlWithoutDefault(s,t);if(i)r=i.behavior;else{const t=e.getGlobalUsingComponent(s);"object"==typeof t&&null!==t&&(r=t.behavior)}}return r?{target:r,type:i,linked:s(o.linked),linkChanged:s(o.linkChanged),unlinked:s(o.unlinked),linkFailed:s(o.linkFailed)}:(O(`the target of relation "${n}" is not a valid behavior or component (when preparing behavior "${t}").`),null)};class Fe{constructor(e,t){this._$comp=e;const n=new Array(6);if(t)for(let e=0;e<6;e+=1){const o=t.definitions[e];if(o){const t=new Array(o.length);for(let e=0;e<o.length;e+=1)t[e]=null;n[e]=t}}this._$group=t,this._$sharedGroup=!0,this._$links=n}add(e){if(this._$sharedGroup){this._$sharedGroup=!1;const e=this._$group;this._$group=e?{definitions:e.definitions.slice(),keyMap:Object.assign(Object.create(null),e.keyMap)}:{definitions:new Array(6),keyMap:Object.create(null)}}const t=Symbol(""),n=this._$group.definitions,o=this._$group.keyMap,s=e.type;n[s]?(o[t]=[s,n[s].length],n[s].push(e)):(o[t]=[s,0],n[s]=[e]);const i=this._$links;return void 0===i[s]?i[s]=[null]:i[s].push(null),t}triggerLinkEvent(e,t){var n,o;const s=this._$comp,i=this._$links,r=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(r)for(let n=0;n<r.length;n+=1){const l=i[e],a=l[n];let d=null;const h=r[n],u=h.target;if(!t){let t=s;for(;;){const n=t.parentNode;if(!n)break;if(t=n,!b(t)){if(y(t)){if(t.hasBehavior(u)){const n=t._$relation;if(n){let s;s=4===e?5:0===e?1:3;const i=null===(o=n._$group)||void 0===o?void 0:o.definitions[s];if(i){for(let e=0;e<i.length;e+=1){const n=i[e];if(n.target&&this._$comp.hasBehavior(n.target)){d={target:t,def:n};break}}if(d)break}}}if(4===e)break}if(2===e)break}}}if(l[n]=d,a){const e=a.target,t=a.def;d&&a.target===d.target&&a.def===d.def?(t.linkChanged&&c("Relation Link Changed Callback",t.linkChanged,e.getMethodCaller(),[s.getMethodCaller()],e),h.linkChanged&&c("Relation Link Changed Callback",h.linkChanged,s.getMethodCaller(),[e.getMethodCaller()],s)):(t.unlinked&&c("Relation Unlinked Callback",t.unlinked,e.getMethodCaller(),[s.getMethodCaller()],e),h.unlinked&&c("Relation Unlinked Callback",h.unlinked,s.getMethodCaller(),[e.getMethodCaller()],s))}if(d){const e=d.target,t=d.def;a&&a.target===d.target&&a.def===d.def||(t.linked&&c("Relation Linked Callback",t.linked,e.getMethodCaller(),[s.getMethodCaller()],e),h.linked&&c("Relation Linked Callback",h.linked,s.getMethodCaller(),[e.getMethodCaller()],s))}t||d||!h.linkFailed||c("Relation Link Failed Callback",h.linkFailed,s.getMethodCaller(),[],s)}}getLinkedTargets(e){var t,n,o,s;const i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return O(`no relation "${String(e)}" found.`),[];const[r,l]=i;if(4===r||2===r||0===r){const e=null===(n=this._$links[r])||void 0===n?void 0:n[l];return e?[e.target]:[]}const a=[],d=this._$comp,c=null===(s=null===(o=this._$group)||void 0===o?void 0:o.definitions[r])||void 0===s?void 0:s[l],h=e=>{const t=e.childNodes;for(let e=0;e<t.length;e+=1){const n=t[e];if(m(n))if(b(n))h(n);else if(y(n)){if(n._$relation){let e;if(e=5===r?n._$relation._$links[4]:1===r?n._$relation._$links[0]:n._$relation._$links[2],e)for(let t=0;t<e.length;t+=1){const o=e[t];if(o&&o.target===d&&o.def===c){a.push(n);break}}}1===r&&h(n)}else 5!==r&&1!==r||h(n)}};return h(this._$comp),a}}class Ge extends Pe{constructor(){throw new Error("Element cannot be constructed directly")}static create(e,t,n,o){var s,r;const l=Object.create(Ge.prototype);l.is=e,l.stylingName=null!=n?n:e,l._$placeholderHandlerRemover=o;const a=t.getBackendContext();let d=null;if(a)if(3===t.getBackendMode())d=a.document.createElement(e);else if(1===t.getBackendMode())d=t._$backendShadowRoot.createElement(e,l.stylingName);else{d=a.createElement(e,l.stylingName)}l._$initialize(!1,d,t,t._$nodeTreeContext);const c=t.getHostNode(),h=c.getComponentOptions(),u=null!==(s=h.styleScope)&&void 0!==s?s:P.globalScope(),p=null!==(r=h.extraStyleScope)&&void 0!==r?r:void 0,f=c._$behavior.ownerSpace.styleScopeManager;if(l.classList=new j(l,void 0,c.classList,u,p,f),d){if(2===t.getBackendMode()&&d.setStyleScope(u,p),i.writeExtraInfoToAttr){const e=f.queryName(u);e&&d.setAttribute("exparser:info-class-prefix",`${e}--`)}3!==t.getBackendMode()?d.associateValue(l):t.getBackendContext().associateValue(d,l)}return l}setModelBindingListener(e,t){if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[e]){const t=this.getBackendElement();if(t){const n=t=>{var n;const o=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[e];o&&o.call(this,t)};3===this.getBackendMode()?this.getBackendContext().setModelBindingStat(t,e,n):t.setModelBindingStat(e,n)}}this._$modelBindingListeners[e]=t}getModelBindingListeners(){const e=Object.create(null);return this._$modelBindingListeners&&Object.keys(this._$modelBindingListeners).forEach((t=>{e[t]=e=>{var n;const o=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[t];o&&o.call(this,e)}})),e}}Ge.isNativeNode=v,Ge.prototype[p]=!0;class Ve{constructor(e,t){this._$slotElement=null,this._$destroyOnDetach=!1,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$text=String(e);let n=null;const o=t.getBackendContext();if(o)if(3===t.getBackendMode())n=o.document.createTextNode(e);else if(1===t.getBackendMode()){n=t._$backendShadowRoot.createTextNode(e)}else{n=o.createTextNode(e)}this._$backendElement=n,this.ownerShadowRoot=t,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}static create(e,t){return new Ve(e,t)}asTextNode(){return this}asElement(){return null}asNativeNode(){return null}asVirtualNode(){return null}asInstanceOf(){return null}destroyBackendElement(){this._$backendElement&&(3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)}destroyBackendElementOnDetach(){this._$destroyOnDetach=!0}getBackendElement(){return this._$backendElement}getComposedParent(){if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}get $$(){return this._$backendElement}get textContent(){return this._$text}set textContent(e){const t=String(e);t!==this._$text&&(this._$text=t,this._$backendElement&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),ae.callTextObservers(this,{type:"characterData",target:this}))}}Ve.isTextNode=g,Ve.prototype[h]=!0;class We extends Pe{constructor(){throw new Error("Element cannot be constructed directly")}_$initializeVirtual(e,t,n){if(this.is=String(e),n&&1===n.mode){const o=t._$backendShadowRoot.createVirtualNode(e);this._$initialize(!0,o,t,n),o.associateValue(this)}else this._$initialize(!0,null,t,t._$nodeTreeContext)}static create(e,t){const n=Object.create(We.prototype);return n._$initializeVirtual(e,t,t.getBackendContext()),n}}var He;We.isVirtualNode=b,We.prototype[f]=!0,function(e){e[e.Direct=0]="Direct",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(He||(He={}));class ze extends We{constructor(){throw new Error("Element cannot be constructed directly")}static createShadowRoot(e){const t=Object.create(ze.prototype);let n=null;1===e.getBackendMode()&&(n=e._$backendElement.getShadowRoot()),t.is="shadow",t._$idMap=null;let o=1;const s=e.getComponentOptions();return s.multipleSlots?o=2:s.dynamicSlots?o=3:s.directSlots&&(o=0),t._$slotMode=o,1===o?t._$singleSlot=null:2===o?(t._$slots=Object.create(null),t._$slotsList=Object.create(null)):3===o&&(t._$dynamicSlotsInserted=!1,t._$dynamicSlots=new Map,t._$requiredSlotValueNames=[],t._$propertyPassingDeepCopy=ye(s.propertyPassingDeepCopy),t._$insertDynamicSlotHandler=void 0,t._$removeDynamicSlotHandler=void 0,t._$updateDynamicSlotHandler=void 0),t._$backendShadowRoot=n,t._$initialize(!0,n,t,e._$nodeTreeContext),t._$host=e,e.shadowRoot=t,null==n||n.associateValue(t),t}getHostNode(){return this._$host}createTextNode(e=""){return new Ve(e,this)}createNativeNode(e){return Ge.create(e,this)}createVirtualNode(e="virtual"){return We.create(e,this)}createNativeNodeWithInit(e,t,n,o){const s=Ge.create(e,this,t,n);return null==o||o(s),s}createComponent(e,t,n,o,s){const i=this._$host,r=i._$behavior,l=i._$genericImpls,a=r.ownerSpace,d=void 0===t?e:t,c=[r._$using[d],l&&l[d]];for(let t=0;t<c.length;t+=1){const d=c[t];if(null==d)continue;if("string"==typeof d)return this.createNativeNodeWithInit(d,e,void 0,s);let h,u;if(d.final)h=d.final;else if(null!==d.placeholder){h=_t(d.placeholder,a,d.source,l);const e=d.waiting;o&&e&&(e.add(o),e.hintUsed(i),u=()=>{e.remove(o)})}if("string"==typeof h)return this.createNativeNodeWithInit(h,e,u,s);if(h)return bt._$advancedCreate(e,h,this,null,$t(h,r,i,n),u,s)}let h=a.getGlobalUsingComponent(d);if(null===h&&a._$allowUnusedNativeNode&&""!==d&&(h=d),!h){if(h=a.getDefaultComponent(),!h)throw new M(`Cannot find component "${d}"`,void 0,this._$host);O(`Cannot find component "${d}", using default component.`,this._$host)}return"string"==typeof h?this.createNativeNodeWithInit(h,e,void 0,s):bt._$advancedCreate(e,h,this,null,$t(h,r,i,n),void 0,s)}createComponentByDef(e,t){return bt._$advancedCreate(e,t,this,null,null,void 0)}createComponentOrNativeNode(e,t,n){const o=this._$host,s=o._$behavior,i=s.ownerSpace,r=i.getGlobalUsingComponent(e);if("string"==typeof r)return this.createNativeNodeWithInit(r,e,void 0,n);if(r)return bt._$advancedCreate(e,r,this,null,$t(r,s,o,t),void 0,n);if(i._$allowUnusedNativeNode){const t=Ge.create(e,this);return null==n||n(t),t}throw new M(`Unknown tag name ${e}`,"[render]",o)}checkComponentPlaceholder(e){var t;let n;const o=this._$host._$behavior._$using[e];if(void 0!==o)n=o;else{const o=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!o)return;n=o}return"string"!=typeof n&&(!n.final&&null!==n.placeholder)}getElementById(e){return this._$getIdMap()[e]}_$markIdCacheDirty(){this._$idMap=null}_$getIdMap(){if(this._$idMap)return this._$idMap;const e=Pe._$generateIdMap(this);return this._$idMap=e,e}getSlotElementFromName(e){const t=this._$slotMode;if(0===t)throw new Error("cannot get slot element in directSlots");if(1===t)return this._$singleSlot;if(2===t)return this._$slots[e]||null;if(3===t){const t=[];for(let n=this._$subtreeSlotStart;n;n=n.next){const o=n.value;(o._$slotName||"")===e&&t.push(o)}return t}return null}getContainingSlot(e){var t;const n=this._$slotMode;if(0===n)return(null==e?void 0:e.containingSlot)||null;if(1===n)return this._$singleSlot;if(3===n){if(!e)return null;let n=e;for(;null===(t=n.parentNode)||void 0===t?void 0:t._$inheritSlots;)n=n.parentNode;const o=n._$slotElement;if((null==o?void 0:o.ownerShadowRoot)===this)return o}if(2===n){let t;return t=m(e)?e._$nodeSlot:"",this._$slots[t]||null}return null}getSlotContentArray(e){if(null===e._$slotName)return null;const t=[];return this.forEachNodeInSpecifiedSlot(e,(e=>{t.push(e)})),t}forEachSlot(e){const t=this._$slotMode;if(0===t)throw new Error("Cannot iterate slots in directSlots");if(1===t)this._$singleSlot&&e(this._$singleSlot);else if(2===t){const t=Object.values(this._$slots);for(let n=0;n<t.length&&!1!==e(t[n]);n+=1);}else if(3===t)for(let t=this._$subtreeSlotStart;t&&!1!==e(t.value);t=t.next);}forEachNodeInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!Pe.forEachNodeInSlot(t[n],e))return!1;return!0}forEachNodeInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const o=n[e];if(!1===t(o))return!1}return!0}return this.forEachNodeInSlot(((e,n)=>null!==n||t(e)))}forEachSlotContentInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!Pe.forEachSlotContentInSlot(t[n],e))return!1;return!0}forEachSlotContentInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const o=n[e];if(!o._$inheritSlots&&!1===t(o))return!1}return!0}return this.forEachSlotContentInSlot(((e,n)=>null!==n||t(e)))}isConnected(e){if(e.ownerShadowRoot!==this)return!1;for(let t=e;t;t=t.parentNode)if(t===this)return!0;return!1}_$applyMultipleSlotInsertion(e,t,n){const o=this._$slotsList,s=this._$slots;if(o[t]){const n=o[t];let s={next:n},i=!0;for(let t=this._$subtreeSlotStart;t&&s.next&&t.value!==e;t=t.next)t.value===s.next.value&&(i=!1,s=s.next);if(i)o[t]=n.prev={value:e,prev:null,next:n};else{const t=s.next;s.next={value:e,prev:s,next:t},t&&(t.prev=s.next)}}else o[t]={value:e,prev:null,next:null};const i=s[t],r=o[t].value;i!==r&&(s[t]=r,Pe._$insertChildReassignSlot(this,t,i||null,r))}_$applyMultipleSlotsRemoval(e,t,n){const o=this._$slotsList,s=this._$slots;let i=o[t]||null;for(;i&&i.value!==e;i=i.next);if(!i)return;const r=i.prev,l=i.next;r&&(r.next=l),l&&(l.prev=r);if(!!r)return;const a=l;if(a){const i=a.value;o[t]=a,n||(s[t]=i,Pe._$insertChildReassignSlot(this,t,e,i))}else delete o[t],n||(delete s[t],Pe._$insertChildReassignSlot(this,t,e,null))}_$applySlotRename(e,t,n){const o=this._$slotMode;if(1!==o&&0!==o){if(2===o)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===o){if(!this._$dynamicSlotsInserted)return;const n=this._$insertDynamicSlotHandler,o=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==o||o([e]),null==n||n([{slot:e,name:t,slotValues:e._$slotValues}])}}}_$applySlotsInsertion(e,t,n){const o=this._$slotMode;if(0!==o){if(1===o){const e=this._$singleSlot,t=this._$subtreeSlotStart.value;if(e===t)return;return this._$singleSlot=t,void Pe._$insertChildReassignSlot(this,null,e||null,t)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;const o=this._$insertDynamicSlotHandler,s=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value,t=e._$slotName;this._$dynamicSlots.set(e,{updatePathTree:void 0}),s.push({slot:e,name:t,slotValues:e._$slotValues})}null==o||o(s)}}else for(let o=e;o&&o!==t.next;o=o.next){const e=o.value,t=e._$slotName;this._$applyMultipleSlotInsertion(e,t,n)}}}_$applySlotsRemoval(e,t,n){var o;const s=this._$slotMode;if(0!==s){if(1===s){if(n)return;const e=this._$singleSlot,t=null===(o=this._$subtreeSlotStart)||void 0===o?void 0:o.value;if(e===t)return;return this._$singleSlot=t,void Pe._$insertChildReassignSlot(this,null,e||null,t||null)}if(2!==s){if(3===s){if(n)return;if(!this._$dynamicSlotsInserted)return;const o=this._$removeDynamicSlotHandler,s=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value;this._$dynamicSlots.delete(e),s.push(e)}null==o||o(s)}}else for(let o=e;o&&o!==t.next;o=o.next){const e=o.value,t=e._$slotName;this._$applyMultipleSlotsRemoval(e,t,n)}}}setDynamicSlotHandler(e,t,n,o){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=o,this._$dynamicSlotsInserted)){const e=this._$dynamicSlots.values();for(let t=e.next();!t.done;t=e.next()){const e=t.value;e.updatePathTree=e.updatePathTree||Object.create(null)}}}useDynamicSlotHandlerFrom(e){e._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(e._$requiredSlotValueNames.slice(),e._$insertDynamicSlotHandler,e._$removeDynamicSlotHandler,e._$updateDynamicSlotHandler)}replaceSlotValue(e,t,n){var o;const s=e._$slotValues;if(!s)return;const i=s[t];let r=n;if(0!==this._$propertyPassingDeepCopy&&(r=2===this._$propertyPassingDeepCopy?re(n,!0):ie(n)),i===r)return;if(s[t]=r,this._$requiredSlotValueNames.indexOf(t)<0)return;const l=null===(o=this._$dynamicSlots)||void 0===o?void 0:o.get(e);l&&(l.updatePathTree||(l.updatePathTree=Object.create(null)),l.updatePathTree[t]=!0)}applySlotValueUpdates(e){var t,n;const o=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),s=null==o?void 0:o.updatePathTree;s&&(o.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,s))}applySlotUpdates(){var e;if(this._$dynamicSlotsInserted){const t=this._$dynamicSlots.entries();for(let n=t.next();!n.done;n=t.next()){const[t,o]=n.value,s=o.updatePathTree;s&&(o.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,t,t._$slotValues,s))}}else{this._$dynamicSlotsInserted=!0;const e=this._$insertDynamicSlotHandler,t=[];for(let e=this._$subtreeSlotStart;e;e=e.next){const n=e.value,o=n._$slotName;this._$dynamicSlots.set(n,{updatePathTree:void 0}),t.push({slot:n,name:o,slotValues:n._$slotValues})}null==e||e(t)}}getSlotMode(){return this._$slotMode}}ze.isShadowRoot=S,ze.prototype[$]=!0;class Ke{constructor(e,t,n,o,s){this.ownerShadowRoot=o,this.elem=n,this.keyName=e,this.updateKeys(t);const i=this.items,r=this.indexes,l=[];for(let e=0;e<i.length;e+=1){const t=i[e],n=null===r?e:r[e];l.push(s(t,n))}n.insertChildren(l,-1)}updateKeys(e){let t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){const o=Object.keys(e);t=new Array(o.length),n=new Array(o.length);for(let s=0;s<o.length;s+=1){const i=o[s],r=e[i];t[s]=r,n[s]=i}}else if("string"==typeof e){O("Use string as for-list is generally for testing. Each character is treated as an item.",this.ownerShadowRoot.getHostNode(),this.elem),t=new Array(e.length),n=null;for(let n=0;n<e.length;n+=1)t[n]=e[n]}else if("number"==typeof e){O("Use number as for-list is generally for testing. The number is used as the repeated times of the item.",this.ownerShadowRoot.getHostNode(),this.elem),t=new Array(e),n=null;for(let n=0;n<e;n+=1)t[n]=n}else O(`The for-list data is neither Array nor Object, got type "${null===e?"null":typeof e}".`,this.ownerShadowRoot.getHostNode(),this.elem),t=[],n=null;this.items=t,this.indexes=n;const o=this.keyName,s=new Array(t.length),i=Object.create(null);let r;if(null!==o){for(let e=0;e<t.length;e+=1){const n=t[e],l="*this"===o?n:null==n?void 0:n[o],a=null!=l?String(l):"";s[e]=a,void 0!==i[a]?(r||(r=Object.create(null)),r[a]=[i[a],e],delete i[a]):(null==r?void 0:r[a])?r[a].push(e):i[a]=e}if(r){const e=Object.keys(r);O(`Some keys are not unique while list updates: "${e.join('", "')}".`,this.ownerShadowRoot.getHostNode(),this.elem);for(let t=0;t<e.length;t+=1){const n=e[t],o=r[n];let l=0;for(let e=0;e<o.length;e+=1){const t=o[e];for(;void 0!==i[`${n}--${l}`];)l+=1;const r=`${n}--${l}`;i[r]=t,s[t]=r}}}}this.rawKeys=s,this.keyMap=i,this.sharedKeyMap=r}diff(e,t,n,o,s){const i=this.rawKeys,r=this.keyMap,l=this.sharedKeyMap,a=this.indexes;this.updateKeys(e);const d=this.rawKeys,c=this.sharedKeyMap,h=this.items,u=this.indexes,p=this.keyName;let f,$;if(!0===t)$=!0,f=null===p;else if(void 0===t)$=t,f=!0;else if(null===p)$=!0,f=!0;else{let e=!1;if(Array.isArray(t))e=!0;else{const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const s=t[n[o]];if(!0===s||("*this"===p?s:null==s?void 0:s[p])){e=!0;break}}}if(e){$=new Array(d.length);for(let e=0;e<d.length;e+=1){const n=d[e];if(void 0!==(null==l?void 0:l[n])||void 0!==(null==c?void 0:c[n]))$[e]=!0;else{const n=t[e];void 0===n||(!0===n||("*this"===p?n:null==n?void 0:n[p])?$[e]=!0:$[e]=n)}}f=!1}else $=t,f=!1}if(f){let e;e=!!Array.isArray(t)||t;let r=0;for(;r<i.length&&r<d.length;){const t=h[r],o=null===u?r:u[r],i=null===a?r:a[r];s(t,o,!0===e||void 0===e?e:e[r],o!==i,n.childNodes[r]),r+=1}if(r<i.length)n.removeChildren(r,i.length-r);else if(r<d.length){const e=[];for(;r<d.length;r+=1){const t=h[r],n=null===u?r:u[r];e.push(o(t,n))}n.insertChildren(e,-1)}return}const _=[],g=[],m=new Array(d.length),v=new Array(d.length);let b=-1,S=-1;for(let e=0;e<d.length;e+=1){const t=d[e];if(i[b+1]===t){b+=1,S+=1,_[S]=b,g[S]=e,m[e]=S>0?g[S-1]:-1,v[e]=b;continue}const n=r[t];if(void 0===n){v[e]=-1;continue}let o=0,s=_.length;for(;o<s;){const e=Math.floor((o+s)/2);n<_[e]?s=e:o=e+1}_[s]=n,g[s]=e,m[e]=s>0?g[s-1]:-1,v[e]=n,b=n,S=s}const y=g.length;if(y===d.length&&y===i.length){let e=0;for(;e<i.length&&e<d.length;){const t=h[e],o=null===u?e:u[e],i=null===a?e:a[e];s(t,o,!0===$||void 0===$?$:$[e],o!==i,n.childNodes[e]),e+=1}return}let C=y>0?g[y-1]:-1,w=y;for(;-1!==C;)w-=1,_[w]=C,C=m[C];const N=_;let E;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(E||(E={}));const x=new Array(i.length),k=new Array(d.length);let O=-1;for(let e=0;e<v.length;e+=1){const t=v[e];if(e!==N[w])if(-1!==t)x[t]=t>O?2:1,k[e]=n.childNodes[t];else{const t=h[e],n=null===u?e:u[e];k[e]=o(t,n)}else O=t,w+=1,x[t]=0}let M=0,L=0,D=0;w=0;do{const e=w<N.length?N[w]:k.length,t=w<N.length?v[e]:x.length;for(;L<t;)if(void 0===x[L]){const e=L;L+=1;let o=1;for(;L<t&&void 0===x[L];)L+=1,o+=1;n.removeChildren(e+M,o),M-=o}else 2===x[L]&&(M-=1),L+=1;for(;D<e;){const o=k[D],i=v[D];if(-1===i){const o=D;D+=1;let s=1;for(;D<e&&-1===v[D];)D+=1,s+=1;n.insertChildren(k.slice(o,o+s),t+M),M+=s}else{n.insertChildAt(o,t+M);const e=h[D],r=null===u?D:u[D],l=null===a?i:a[i];s(e,r,!0===$||void 0===$?$:$[D],r!==l,o),2===x[i]&&(M+=1),D+=1}}if(w<N.length){const o=h[e],i=null===u?e:u[e],r=null===a?t:a[t];s(o,i,!0===$||void 0===$?$:$[e],i!==r,n.childNodes[t+M])}L=t+1,D=e+1,w+=1}while(w<=N.length)}}const qe=e=>e,Xe=e=>{const t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Ye=e=>null==e?"":String(e),Ze=e=>e.replace(/-(.|$)/g,(e=>e[1]?e[1].toUpperCase():""));class Qe{constructor(e,t,n,o){this.bindingMapDisabled=!1,this.eventObjectFilter=qe,this.changePropFilter=qe,this.eventListenerFilter=qe,this.r=(e,t,n,o,s)=>{var i;const r=t=>{if(t.startsWith("bind"))this.v(e,t.slice(4),Ye(n),!1,!1,!1,!0,s);else if(t.startsWith("captureBind"))this.v(e,t.slice(11),Ye(n),!1,!1,!0,!0,s);else if(t.startsWith("catch"))this.v(e,t.slice(5),Ye(n),!0,!1,!1,!0,s);else if(t.startsWith("captureCatch"))this.v(e,t.slice(12),Ye(n),!0,!1,!0,!0,s);else{if(!t.startsWith("on"))return!1;this.v(e,t.slice(2),Ye(n),!1,!1,!1,!0,s)}return!0};if(y(e)){const s=bt.getDataProxy(e),l=Ze(t);if(s.replaceProperty(l,n)){void 0!==o&&(null===o?s.setModelBindingListener(l,(()=>{})):s.setModelBindingListener(l,(t=>{const n=e.ownerShadowRoot.getHostNode(),s=bt.getDataProxy(n);s.replaceDataOnPath(o,t),s.applyDataUpdates(!1)})));const r=Xe(e);if(null===(i=r.changeProp)||void 0===i?void 0:i[t]){const o=r.changeProp[t],s=o.oldValue;if(s!==n){o.oldValue=n;const t=e.ownerShadowRoot.getHostNode();o.listener.call(t.getMethodCaller(),n,s,t,e)}}}else e.hasExternalClass(t)?e.setExternalClass(t,n):r(l)}else if(v(e)){if(this.fallbackListenerOnNativeNode){r(Ze(t))||e.updateAttribute(t,n)}else e.updateAttribute(t,n);o&&e.setModelBindingListener(t,(t=>{const n=e.ownerShadowRoot.getHostNode(),s=bt.getDataProxy(n);s.replaceDataOnPath(o,t),s.applyDataUpdates(!1)}))}},this.shadowRoot=e,this.procGen=t,this.fallbackListenerOnNativeNode=n,o&&(this.eventObjectFilter=o)}create(e){const{shadowRoot:t,procGen:n}=this,o=n(this,!0,e,void 0);return this.handleChildrenCreationAndInsert(o.C,t,void 0,void 0),o.B}update(e,t){const{shadowRoot:n,procGen:o}=this,s=o(this,!1,e,t);this.handleChildrenUpdate(s.C,n,void 0,void 0)}bindingMapUpdate(e,t,n){if(this.bindingMapDisabled)return!1;const o=n[e];if(!o)return!1;let s=null;for(let e=0;e<o.length;e+=1){(0,o[e])(t,(e=>{if(null!==s&&e!==s&&y(s)&&s.hasPendingChanges()){bt.getDataProxy(s).applyDataUpdates(!0)}s=e}),((e,t)=>{e.textContent=t}))}const i=s;if(null!==i&&y(i)&&i.hasPendingChanges()){bt.getDataProxy(i).applyDataUpdates(!0)}return!0}handleChildrenCreation(e,t,n){const o=[];return e(!0,((e,s)=>{if(t&&""!==n){const e=this.createDynamicPlaceholder(t);return void o.push(e)}const i=this.shadowRoot.createTextNode(e);i.destroyBackendElementOnDetach(),t&&Pe.setSlotElement(i,t),s&&s(i),o.push(i)}),((e,s,i,r,l,a)=>{if(t&&n!==(l||"")){const e=this.createDynamicPlaceholder(t);return void o.push(e)}const d=this.createCommonElement(e,s,i,r,a);if(t){Pe.setSlotElement(d,t);Xe(d).dynamicSlotNameMatched=!0}else void 0!==l&&(d.slot=l);o.push(d)}),((e,s)=>{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnDetach(),Pe.setInheritSlots(i),t&&Pe.setSlotElement(i,t);Xe(i).key=e,this.handleChildrenCreationAndInsert(s,i,t,n),o.push(i)}),((e,s,i,r,l)=>{const a=this.shadowRoot,d=a.createVirtualNode("wx:for");d.destroyBackendElementOnDetach(),Pe.setInheritSlots(d),t&&Pe.setSlotElement(d,t);Xe(d).keyList=new Ke(s,e,d,a,((e,o)=>{const s=a.createVirtualNode("wx:for-item");return s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),t&&Pe.setSlotElement(d,t),this.handleChildrenCreationAndInsert(((t,n,s,i,a,d,c)=>{l(!0,e,o,void 0,void 0,r?[...r,o]:null,n,s,i,a,d,c)}),s,t,n),s})),o.push(d)}),((e,n,s)=>{const i=this.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),Pe.setSlotName(i,Ye(e)),t?Pe.setSlotElement(i,t):void 0!==s&&(i.slot=s),n&&n(i),o.push(i)}),((e,s)=>{if(void 0!==s)if(t)if(n===s){const n=this.shadowRoot.createVirtualNode("virtual");n.destroyBackendElementOnDetach(),Pe.setSlotElement(n,t);Xe(n).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,n,void 0,void 0),o.push(n)}else{const e=this.createDynamicPlaceholder(t);o.push(e)}else{const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnDetach(),t.slot=s,this.handleChildrenCreationAndInsert(e,t,void 0,void 0),o.push(t)}else{const s=this.shadowRoot.createVirtualNode("virtual");s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),t&&Pe.setSlotElement(s,t),this.handleChildrenCreationAndInsert(e,s,t,n),o.push(s)}}),void 0,void 0),o}handleChildrenCreationAndInsert(e,t,n,o){const s=this.handleChildrenCreation(e,n,o);s.length&&t.insertChildren(s,-1)}handleChildrenUpdate(e,t,n,o){let s=0;const i=n?n.slotNodes.filter((e=>e.parentNode===t)):t.childNodes;e(!1,(e=>{const t=i[s];if(s+=1,n){if(!Xe(t).dynamicSlotNameMatched)return}void 0!==e&&(t.textContent=e)}),((e,r,l,a,d,c)=>{const h=i[s];if(s+=1,n){const s=Xe(h);if(o!==(d||"")){if(s.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,h)}return}if(!s.dynamicSlotNameMatched){const o=this.createCommonElement(e,r,l,a,c);Pe.setSlotElement(o,n);return Xe(o).dynamicSlotNameMatched=!0,void t.replaceChild(o,h)}}l(h,!1);let u=!1;if(y(h)){const e=this.dynamicSlotUpdate(h,c,a);if(e&&(u=!0),h.hasPendingChanges()){bt.getDataProxy(h).applyDataUpdates(!0)}null==e||e.applySlotUpdates()}n||void 0!==d&&(h.slot=d),u||this.handleChildrenUpdate(a,h,void 0,void 0)}),((e,r)=>{const l=i[s];s+=1;if(Xe(l).key===e)this.handleChildrenUpdate(r,l,n,o);else{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnDetach(),Pe.setInheritSlots(i),n&&Pe.setSlotElement(i,n);Xe(i).key=e,this.handleChildrenCreationAndInsert(r,i,n,o),n?t.replaceChild(i,l):t.replaceChildAt(i,s-1)}}),((e,t,r,l,a)=>{const d=i[s];s+=1;Xe(d).keyList.diff(e,r,d,((e,t)=>{const s=this.shadowRoot.createVirtualNode("wx:for-item");return s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),n&&Pe.setSlotElement(d,n),this.handleChildrenCreationAndInsert(((n,o,s,i,r,d,c)=>{a(!0,e,t,void 0,void 0,l?[...l,t]:null,o,s,i,r,d,c)}),s,n,o),s}),((e,t,s,i,r)=>{this.handleChildrenUpdate(((n,o,r,d,c,h,u)=>{a(!1,e,t,s,!!i||void 0,l?[...l,t]:null,o,r,d,c,h,u)}),r,n,o)}))}),((e,t,o)=>{const r=i[s];s+=1,void 0!==e&&Pe.setSlotName(r,Ye(e)),n||void 0!==o&&(r.slot=o),t&&t(r),this.shadowRoot.applySlotValueUpdates(r)}),((e,r)=>{const l=i[s];if(s+=1,void 0!==r)if(n){const s=Xe(l);if(o===r)if(s.dynamicSlotNameMatched)this.handleChildrenUpdate(e,l,void 0,void 0);else{const o=this.shadowRoot.createVirtualNode("virtual");o.destroyBackendElementOnDetach(),Pe.setSlotElement(o,n);Xe(o).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,o,void 0,void 0),t.replaceChild(o,l)}else if(s.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,l)}}else l.slot=r,this.handleChildrenUpdate(e,l,void 0,void 0);else this.handleChildrenUpdate(e,l,n,o)}),void 0,void 0)}dynamicSlotUpdate(e,t,n){const o=e.getShadowRoot();return 3===(null==o?void 0:o.getSlotMode())?(o.setDynamicSlotHandler(t||[],(t=>{const o=[];for(let e=0;e<t.length;e+=1){const{slot:s,name:i,slotValues:r}=t[e],l=this.handleChildrenCreation(((e,t,o,s,i,l,a)=>{n(!0,t,o,s,i,l,a,r,void 0)}),s,i);o.push(...l)}o.length&&e.insertChildren(o,-1)}),(t=>{if(!t.length||!t[0].slotNodes.length)return;t.sort(((e,t)=>e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex));let n=-1/0,o=-1/0;for(let s=0;s<t.length;s+=1){const i=t[s].slotNodes,r=i[0].parentIndex;o===r||(n>=0&&e.removeChildren(n,o-n),n=r),o=r+i.length}n>=0&&e.removeChildren(n,o-n)}),((t,o,s)=>{const i=t._$slotName||"";this.handleChildrenUpdate(((e,t,i,r,l,a,d)=>{n(!1,t,i,r,l,a,d,o,s)}),e,t,i)})),o):null}createDynamicPlaceholder(e){const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnDetach(),Pe.setSlotElement(t,e);return Xe(t).dynamicSlotNameMatched=!1,t}createCommonElement(e,t,n,o,s){let i=!1;const r=e=>{const t=y(e)?this.dynamicSlotUpdate(e,s,o):null;if(t&&(i=!0),n(e,!0),y(e)){if(e.hasPendingChanges()){bt.getDataProxy(e).applyDataUpdates(!0)}null==t||t.applySlotUpdates()}},l=this.shadowRoot.createComponent(e,e,t,(()=>{var n;const o=this.shadowRoot.createComponent(e,e,t,void 0,r);o.destroyBackendElementOnDetach();const s=o.getShadowRoot(),i=y(l)?l.getShadowRoot():null,a=3===(null==i?void 0:i.getSlotMode()),d=3===(null==s?void 0:s.getSlotMode());d!==a?k(new Error(`The "dynamicSlots" option of component <${o.is}> and its placeholder <${l.is}> should be the same.`),"[render]",y(o)?o:o.is):d?null===(n=l.parentNode)||void 0===n||n.replaceChild(o,l):l.selfReplaceWith(o)}),r);return l.destroyBackendElementOnDetach(),i?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(o,l,void 0,void 0),l}s(e,t){e.slot=t}l(e,t,n){this.shadowRoot.replaceSlotValue(e,t,n)}i(e,t){e.id=t}c(e,t){if(y(e)){e.hasExternalClass("class")&&e.setExternalClass("class",t)}e.setNodeClass(t)}y(e,t){if(y(e)&&bt.hasProperty(e,"style")){const n=bt.getDataProxy(e),o=Ze("style");n.replaceProperty(o,t)}else e.setNodeStyle(Ye(t),0)}d(e,t,n){e.setDataset(t,n)}m(e,t,n){e.setMark(t,n)}v(e,t,n,o,s,i,r,l){const a="function"==typeof n?this.eventListenerFilter(n):Ye(n),d=t=>{const n=e.ownerShadowRoot.getHostNode();let o;const s=n.getMethodCaller(),i="function"==typeof a?a:bt.getMethod(n,a);if("function"==typeof i){const e=this.eventObjectFilter(t);o=i.call(s,e)}return o},c={final:o,mutated:s,capture:i};if(r){const n=Xe(e);n.dynEvListeners||(n.dynEvListeners={});const o=n.dynEvListeners;o[t]&&e.removeListener(t,o[t],c),o[t]=d}a&&e.addListener(t,d,c)}wl(e,t,n){y(e)&&e.triggerWorkletChangeLifetime(t,n)}p(e,t,n,o){if(y(e)&&bt.hasProperty(e,t)){const o=Xe(e);o.changeProp||(o.changeProp=Object.create(null)),o.changeProp[t]={listener:this.changePropFilter(n),oldValue:e.data[t]}}}setFnFilter(e,t){this.changePropFilter=e,this.eventListenerFilter=t}}var Je;!function(e){e[e.Data=0]="Data",e[e.Script=1]="Script",e[e.InlineScript=2]="InlineScript"}(Je||(Je={}));const et=()=>{};class tt{constructor(e,t){this.shadowRoot=e,this.procGen=t}create(e){const{shadowRoot:t,procGen:n}=this,o=n(this,!0,e,void 0);return this.handleChildrenCreation(o.C,t.shadowRootElement),o.B}bindingMapUpdate(e,t,n){const o=n[e];if(void 0!==o)for(let e=0;e<o.length;e+=1){(0,o[e])(t,(()=>{}),((e,t)=>{e.textContent=t}))}}handleChildrenCreation(e,t){let n=!0,o=!1;const s=()=>{n=!1,o=!1;const e=document.createElement("virtual");t.appendChild(e),this.shadowRoot.slot=e};e(!0,((e,i)=>{o?s():n=!1;const r=document.createTextNode(e||"");i&&i(r),t.appendChild(r)}),((e,i,r,l)=>{o?s():n=!1;const a=document.createElement(e);r(a,!0),this.handleChildrenCreation(l,a),t.appendChild(a)}),et,et,(()=>{n?(o=!0,this.shadowRoot.slot=t):s()}),(e=>{o?s():n=!1;const i=document.createElement("virtual");this.handleChildrenCreation(e,i),t.appendChild(i)}))}s(){}i(e,t){this.shadowRoot.idMap[t]=e}c(e,t){e.setAttribute("class",t)}y(e,t){e.setAttribute("style",t)}d(e,t,n){e.dataset[t]=Ye(n)}m(){}v(e,t,n,o){this.shadowRoot.setListener(e,t,(e=>{const t=this.shadowRoot.template.methods[n],s=null==t?void 0:t(e);return!o&&s}))}r(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Ye(n))}p(){}setFnFilter(){}}const nt=()=>({C:(e,t,n,o,s,i)=>{i("")},B:Object.create(null)}),ot=()=>nt;class st{constructor(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);{const t=e._$template||{content:ot};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content}}this.updateMode="",this.methods=e._$methodMap}createInstance(e){return new it(this,e)}}class it{constructor(e,t){if(3!==t.getBackendMode())throw new Error(`Component template of ${t.is} cannot be initialized since external rendering is only supported in Domlike backend currently.`);const n=t.getBackendElement();if(!n)throw new Error(`Component template of ${t.is} cannot be initialized as external components since no suitable backend element found.`);this.comp=t,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=e;const o=e.genObjectGroupEnv.group("")||ot();this.procGenWrapper=new tt(this,o),this.idMap=Object.create(null),this.listeners=[]}initValues(e){if(this.bindingMapGen=this.procGenWrapper.create(e),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");const t=this.shadowRootElement;if(this.slot===t&&t.childNodes.length>0){const e=document.createElement("virtual");t.appendChild(e),this.slot=e}}getIdMap(){return this.idMap}updateValues(e,t){const n=this.bindingMapGen;for(let o=0;o<t.length;o+=1){const[s]=t[o];this.procGenWrapper.bindingMapUpdate(s[0],e,n)}}setListener(e,t,n){const o=e;o._$wxTmplEv?o._$wxTmplEv[t]=n:o._$wxTmplEv={[t]:n}}handleEvent(e,t){var n;const o=e;let s=o;const i=this.shadowRootElement,r=t.getEventName(),l=t.bubbles;for(;;){const e=t.wrapShadowedEvent(o,null,s),a=null===(n=s._$wxTmplEv)||void 0===n?void 0:n[r];if(a){!1===a.call(s,e)&&(t.preventDefault(),t.stopPropagation())}if(!l||t.propagationStopped())break;if(s===i)break;const d=s.parentNode;if(!d)break;s=d}}}const rt=()=>({C:(e,t,n,o,s,i)=>{i("")},B:Object.create(null)}),lt=()=>rt;var at;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(at||(at={}));class dt{create(e,t){return t.externalComponent?new st(e):new ct(e)}}class ct{constructor(e){this.updateTemplate(e)}updateTemplate(e){const t=e._$template;if("object"!=typeof t&&void 0!==t)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);const n=t||{content:lt};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.fallbackListenerOnNativeNode=n.fallbackListenerOnNativeNode||!1,this.eventObjectFilter=n.eventObjectFilter}createInstance(e,t){return new ht(this,e,t(e))}}class ht{constructor(e,t,n){this.comp=t,this.shadowRoot=n,this.shadowRoot.destroyBackendElementOnDetach(),this._$applyTemplate(e)}updateTemplate(e,t){this._$applyTemplate(e),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(t)}_$applyTemplate(e){const t=e.genObjectGroupEnv.group("")||lt();"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Qe(this.shadowRoot,t,e.fallbackListenerOnNativeNode,e.eventObjectFilter),this.bindingMapGen=void 0}initValues(e){return this.bindingMapGen=this.procGenWrapper.create(e),this.shadowRoot}updateValues(e,t){if(2===this.forceBindingMapUpdate){for(let n=0;n<t.length;n+=1)this.tryBindingMapUpdate(e,t[n]);return}if(1===this.forceBindingMapUpdate&&t.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(e,t[0]))return;const n=Object.create(null);for(let e=0;e<t.length;e+=1){const[o,s,i,r]=t[e];let l=n;for(let e=0;e<o.length;e+=1){const t=o[e],n=l[t];if(!0===n)break;if(e===o.length-1){if(void 0===r)l[t]=!0;else{const e=i;if(void 0===n)l[t]=new Array(e);else if(!Array.isArray(n)){const o=new Array(e),s=Object.keys(n);for(let e=0;e<s.length;e+=1){const t=s[e],i=n[t],r=Number(t);o.length<r&&(o.length=r),o[t]=i}l[t]=o}const o=l[t];o.length<e&&(o.length=e);const a=new Array(s.length);a.fill(!0),o.splice(i,r,...a)}break}if(void 0===n){const e=Object.create(null);l[t]=e,l=e}else l=n}}this.procGenWrapper.update(e,n)}tryBindingMapUpdate(e,t){if(!t)return!0;const n=this.bindingMapGen;if(!n)return!1;const[o]=t;return 1===o.length&&this.procGenWrapper.bindingMapUpdate(o[0],e,n)}}let ut=null;const pt=()=>{if(ut)return ut;const e=new dt;return ut=e,e};var ft=Object.freeze({__proto__:null,DEFAULT_PROC_GEN_GROUP:lt,GlassEaselTemplateEngine:dt,getDefaultTemplateEngine:pt});const $t=(e,t,n,o)=>{const s=t.ownerSpace,i=null==n?void 0:n._$behavior._$using,r=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();const l=e.behavior;let a;const d=l._$generics;if(d){const n=l._$genericDefaults;a=Object.create(null);for(let l=0;l<d.length;l+=1){const c=d[l];if(o&&Object.prototype.hasOwnProperty.call(o,c)){const n=o[c];if("string"==typeof n)if(null==i?void 0:i[n])a[c]=i[n];else if(r&&r[n])a[c]=r[n];else{const o=s.getGlobalUsingComponent(n);if("string"==typeof o)a[c]=o;else if(o)a[c]={final:o,source:t,placeholder:null,waiting:null};else{O(`Generic "${c}" value "${n}" is not valid`,e.is);const o=s.getDefaultComponent();if(!o)throw new M(`Cannot find default component for generic "${c}"`,"[prepare]",e.is);a[c]={final:o,source:t,placeholder:null,waiting:null}}}else a[c]=n}else{const o=n[c]||s.getDefaultComponent();if(!o)throw new M(`Cannot find default component for generic "${c}"`,"[prepare]",e.is);a[c]="string"==typeof o?o:{final:o,source:t,placeholder:null,waiting:null}}}}else a=null;return a},_t=(e,t,n,o)=>{const s=n._$using[e]||o&&o[e];let i=null;if(s&&("string"==typeof s?i=s:null===s.placeholder?i=s.final:O("Placeholder on generic implementation is not valid",n.is)),i)return i;let r=t.getGlobalUsingComponent(e);if(null===r&&t._$allowUnusedNativeNode&&""!==e&&(r=e),!r){if(r=t.getDefaultComponent(),!r)throw new M(`Cannot find placeholder target "${e}"`,"[prepare]",n.is);O(`Cannot find placeholder target "${e}", using default component.`,n.is)}return r};class gt{constructor(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=r(e._$options,e.ownerSpace.getComponentOptions());const t=this._$options.templateEngine;this._$templateEngine=null!=t?t:pt()}general(){return this}getComponentOptions(){return this._$options}getComponentDependencies(){return this.behavior.getComponentDependencies()}updateTemplate(e){var t;if(!(null===(t=this._$detail)||void 0===t?void 0:t.template.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);this.behavior._$updateTemplate(e),this._$detail.template.updateTemplate(this.behavior)}isPrepared(){return!!this._$detail}prepare(){if(this._$detail)return;this.behavior.prepare();const e=this.behavior,t=this._$options,n={};if(t.writeFieldsToNode){const t=Object.keys(e._$propertyMap);for(let e=0;e<t.length;e+=1){const o=t[e];n[o]={enumerable:!0,get(){return this._$dataGroup.data[o]},set(e){const t=this._$dataGroup;t.replaceDataOnPath([o],e),t.applyDataUpdates()}}}const o=Object.keys(e._$methodMap);for(let t=0;t<o.length;t+=1){const s=o[t];n[s]={enumerable:!0,value:e._$methodMap[s]}}}const o=function(){};n.constructor={value:o,writable:!0};const s=o.prototype=Object.create(bt.prototype,n);s._$behavior=e,s._$definition=this,s._$methodMap=e._$methodMap;const i=e._$generateObserverTree();s._$lifetimeFuncs=e._$getAllLifetimeFuncs(),s._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();const r=(e=>{if(void 0===e)return null;const t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,o=t.keyMap,s=Object.keys(e);for(let t=0;t<s.length;t+=1){const i=s[t],r=e[i],l=r.type;n[l]?(o[i]=[l,n[l].length],n[l].push(r)):(o[i]=[l,0],n[l]=[r])}return t})(e._$relationMap),l=ye(t.dataDeepCopy),a=ye(t.propertyPassingDeepCopy),d=this._$templateEngine.create(e,t);this._$detail={proto:s,template:d,dataGroupObserverTree:i,dataDeepCopy:l,propertyPassingDeepCopy:a,relationDefinitionGroup:r}}}let mt=1,vt=null;class bt extends Pe{constructor(){throw new Error("Element cannot be constructed directly")}general(){return this}asInstanceOf(e){return this._$behavior!==e.behavior?null:this}static register(e,t){return(t||X()).defineComponent(e)}static _$tagMethod(e){const t=e;return t[U]=!0,t}static _$isTaggedMethod(e){return"function"==typeof e&&!!e[U]}static _$advancedCreate(e,t,n,o,s,r,a){var d,h,u,p;t._$detail||t.prepare();const{proto:f,template:$,dataDeepCopy:_,propertyPassingDeepCopy:g,relationDefinitionGroup:m}=t._$detail;let v=t._$detail.dataGroupObserverTree;const b=t._$options,S=t.behavior,y=n?n.getBackendContext():o||i.backendContext||(()=>{if(vt)return vt;let e;return e=new A,vt=e,e})(),C=b.externalComponent,w=b.propertyEarlyInit,N=i.writeExtraInfoToAttr,E=b.virtualHost,x=Object.create(f);x._$genericImpls=s,x._$placeholderHandlerRemover=r,x._$external=C,x.tagName=e,x._$methodCaller=x,x._$virtual=E;let O=null;if(y)if(3===y.mode)E||(O=y.document.createElement(e));else if(2===y.mode)E||(O=y.createElement(b.hostNodeTagName,e));else if(1===y.mode){O=(n?n._$backendShadowRoot:y.getRootNode()).createComponent(e,C,E,null!==(d=b.styleScope)&&void 0!==d?d:P.globalScope(),b.extraStyleScope,S._$externalClasses)}x._$initialize(E,O,n,n?n._$nodeTreeContext:y);const L=n?n.getHostNode():void 0,D=null==L?void 0:L.getComponentOptions(),T=null!==(h=null==D?void 0:D.styleScope)&&void 0!==h?h:P.globalScope(),B=null!==(u=null==D?void 0:D.extraStyleScope)&&void 0!==u?u:void 0,I=null==L?void 0:L._$behavior.ownerSpace.styleScopeManager;if(x.classList=new j(x,S._$externalClasses,L?L.classList:null,T,B,I),O&&(2===y.mode&&O.setStyleScope(T,B,null!==(p=b.styleScope)&&void 0!==p?p:P.globalScope()),I&&N)){const e=I.queryName(T);e&&O.setAttribute("exparser:info-class-prefix",`${e}--`)}const R=$.createInstance(x,ze.createShadowRoot);if(O&&(3!==y.mode?O.associateValue(x):y.associateValue(O,x)),N&&O){const e=mt;mt+=1,x._$componentInstanceId=e,O.setAttribute("exparser:info-component-id",e)}x._$idPrefix=b.idPrefixGenerator?b.idPrefixGenerator.call(x):"";const U=S._$staticData,F=S._$data;let W;if(void 0===U)if(1===F.length){W=(0,F[0])(x)}else{W={};for(let e=0;e<F.length;e+=1){const t=F[e];Object.assign(W,t(x))}}else{W=ie(U);for(let e=0;e<F.length;e+=1){const t=F[e];Object.assign(W,t(x))}}const H=x._$relation=new Fe(x,m);x._$traitGroup=new V;const z=S._$traitBehaviors;if(void 0!==z)for(let e=0;e<z.length;e+=1){const{traitBehavior:t,impl:n}=z[e];x._$traitGroup.implement(t,n)}if(S._$methodCallerInit){const e=S._$methodCallerInit.call(x);x._$methodCaller=e}let K=!1;if(S._$init.length>0){let e=!0,t=!0,n=!0,o=!0;const s=x.getMethodCaller(),i={self:s,data:W,setData:x.setData.bind(x),implement:(e,t)=>{if(K)throw new M("Cannot execute init-time functions after initialization","[implement]",S.is);x._$traitGroup.implement(e,t)},relation:function(e){if(K)throw new M("Cannot execute init-time functions after initialization","[implement]",S.is);const t=e.target,n=Ue(S.ownerSpace,S.is,"undefined",e);let o;return o=n?H.add(n):Symbol("invalid"),{list:()=>H.getLinkedTargets(o).map((e=>e.getMethodCaller())),listAsTrait:t instanceof G?()=>H.getLinkedTargets(o).map((e=>e.traitBehavior(t))):void 0}},observer:(t,n)=>{if(K)throw new M("Cannot execute init-time functions after initialization","[implement]",S.is);e&&(e=!1,v=v.cloneSub());try{v.addObserver(n,ne(t))}catch(e){k(e,"observer",S.is)}},lifetime:(e,n)=>{if(K)throw new M("Cannot execute init-time functions after initialization","[implement]",S.is);t&&(t=!1,x._$lifetimeFuncs=S._$getAllLifetimeFuncs());const o=x._$lifetimeFuncs;if(o[e])o[e].add(n);else{(o[e]=new l("lifetime")).add(n)}},pageLifetime:(e,t)=>{if(K)throw new M("Cannot execute init-time functions after initialization","[implement]",S.is);n&&(n=!1,x._$pageLifetimeFuncs=S._$getAllPageLifetimeFuncs());const o=x._$pageLifetimeFuncs;if(o[e])o[e].add(t);else{(o[e]=new l("pageLifetime")).add(t)}},method:e=>bt._$tagMethod(e),listener:e=>bt._$tagMethod(e)},r=S._$init;for(let e=0;e<r.length;e+=1){const t=c("Component Init",r[e],s,[i],void 0);if(t){const e=Object.keys(t);for(let n=0;n<e.length;n+=1){const s=e[n],i=t[s];bt._$isTaggedMethod(i)&&(o&&(o=!1,x._$methodMap=Object.create(x._$methodMap)),x._$methodMap[s]=i,b.writeFieldsToNode&&(x[s]=i))}}}}K=!0;const q=R.shadowRoot;x.shadowRoot=q;const X=new Ce(x,W,b.pureDataPattern||null,_,g,b.reflectToAttributes,v);x._$dataGroup=X,w&&void 0!==a&&a(x),R.initValues(X.innerData||X.data),x._$tmplInst=R,X.setUpdateListener(((e,t)=>{R.updateValues(e,t)}));const Y=S._$listeners;if(void 0!==Y)for(let e=0;e<Y.length;e+=1){const{id:t,ev:n,listener:o}=Y[e],s=o;if("this"===t)x.addListener(n,(e=>s.call(x._$methodCaller,e)));else if(C){const e=q,o=t?e.getIdMap()[t]:e.root;o&&e.setListener(o,n,(e=>s.call(x._$methodCaller,e)))}else{const e=q,o=t?e.getElementById(t):e;o&&o.addListener(n,(e=>s.call(x._$methodCaller,e)))}}return x.triggerLifetime("created",[]),w||void 0===a||a(x),x}static createWithGenericsAndContext(e,t,n,o,s){const i=e=>{let t;return n&&(t=Object.create(null),Object.entries(n).forEach((([n,o])=>{t[n]={final:o,source:e.behavior,placeholder:null,waiting:null}}))),$t(e,e.behavior,void 0,t)};if(t)return bt._$advancedCreate(String(e),t,null,o,i(t),void 0,s);if(e instanceof gt)return bt._$advancedCreate(e.is,e,null,o,i(e),void 0);const r=X().getComponentByUrl(e,"");return bt._$advancedCreate(e,r,null,o,i(r),void 0)}static createWithGenerics(e,t,n,o){return bt.createWithGenericsAndContext(e,t,n,null,o)}static createWithContext(e,t,n,o){return bt.createWithGenericsAndContext(e,t,null,n,o)}static create(e,t,n){return bt.createWithGenericsAndContext(e,t,null,null,n)}get is(){return this._$definition.is}get properties(){return this._$dataGroup.data}get data(){return this._$dataGroup.data}set data(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","data setter",this);Object.entries(e).forEach((([e,n])=>t.replaceDataOnPath([e],n))),t.applyDataUpdates()}get $(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()}getShadowRoot(){return this._$external?null:this.shadowRoot}applyTemplateUpdates(){var e;if(!(null===(e=this._$tmplInst)||void 0===e?void 0:e.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);const t=this._$dataGroup;this._$tmplInst.updateTemplate(this._$definition._$detail.template,t.innerData||t.data)}getOwnerSpace(){return this._$behavior.ownerSpace}isExternal(){return this._$external}static listProperties(e){return Object.keys(e._$behavior._$propertyMap)}static hasProperty(e,t){return!!e._$behavior._$propertyMap[t]}static getMethodsFromDef(e){return e.behavior._$methodMap}static getMethod(e,t){if(e._$definition._$options.useMethodCallerListeners){const n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]}callMethod(e,...t){const n=bt.getMethod(this,e);return null==n?void 0:n.call(this,...t)}getComponentDefinition(){return this._$definition}getComponentOptions(){return this._$definition._$options}hasBehavior(e){return e instanceof G?void 0!==this._$traitGroup.get(e):this._$behavior.hasBehavior(e)}getRootBehavior(){return this._$behavior}traitBehavior(e){return this._$traitGroup.get(e)}setMethodCaller(e){this._$methodCaller=e}getMethodCaller(){return this._$methodCaller}triggerLifetime(e,t){const n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t,this)}triggerLifeTime(e,t){return this.triggerLifetime(e,t)}triggerPageLifetime(e,t){const n=o=>{if(y(o)){if(o._$pageLifetimeFuncs){const n=o._$pageLifetimeFuncs[e];n&&n.call(o._$methodCaller,t,this)}o._$external||n(o.shadowRoot)}const s=o.childNodes;for(let e=0;e<s.length;e+=1){const t=s[e];m(t)&&n(t)}};n(this)}triggerPageLifeTime(e,t){return this.triggerPageLifetime(e,t)}getRelationNodes(e){var t;return(null===(t=this._$relation)||void 0===t?void 0:t.getLinkedTargets(e))||[]}hasExternalClass(e){return this.classList._$hasAlias(e)}setExternalClass(e,t){this.scheduleExternalClassChange(e,t),this.applyExternalClassChanges()}getExternalClasses(){return this.classList._$getAlias()}scheduleExternalClassChange(e,t){this.classList._$setAlias(e,t)}applyExternalClassChanges(){if(this._$external)return;if(!this.classList._$shouldUpdateExternalClass())return;const e=t=>{if(!m(t))return;const n=t.classList;(null==n?void 0:n._$spreadExternalClassUpdate())&&y(t)&&t.applyExternalClassChanges();const o=t.childNodes;for(let t=0,n=o.length;t<n;t+=1)e(o[t]);null==n||n._$markExternalClassUpdated()};e(this.shadowRoot)}triggerWorkletChangeLifetime(e,t){this.triggerLifetime("workletChange",[e,t])}isInnerDataExcluded(e){var t;return(null===(t=this._$definition._$options.pureDataPattern)||void 0===t?void 0:t.test(e))||!1}static getInnerData(e){return e._$dataGroup.innerData}static getDataProxy(e){return e._$dataGroup}static replaceWholeData(e,t){e._$dataGroup.replaceWholeData(t)}replaceDataOnPath(e,t){const n=this._$dataGroup;if(void 0===n)throw new M("Cannot update data before component created","replaceDataOnPath",this);n.replaceDataOnPath(e,t)}spliceArrayDataOnPath(e,t,n,o){const s=this._$dataGroup;if(void 0===s)throw new M("Cannot update data before component created","spliceArrayDataOnPath",this);s.spliceArrayDataOnPath(e,t,n,o)}hasPendingChanges(){const e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0}applyDataUpdates(){const e=this._$dataGroup;if(void 0===e)throw new M("Cannot update data before component created","applyDataUpdates",this);e.applyDataUpdates()}groupUpdates(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","groupUpdates",this);const n=e();return t.applyDataUpdates(),n}updateData(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","updateData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let o=0;o<n.length;o+=1){const s=n[o];try{const n=te(s);t.replaceDataOnPath(n,e[s])}catch(e){k(e,"updateData",this)}}}}setData(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","setData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let o=0;o<n.length;o+=1){const s=n[o];try{const n=te(s);t.replaceDataOnPath(n,e[s])}catch(e){k(e,"setData",this)}}}t.applyDataUpdates()}}bt.isComponent=y,bt.prototype[_]=!0;class St{constructor(e,t){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this._$is=e,this._$ownerSpace=t}methodCallerInit(e){return this._$methodCallerInit=e,this}behavior(e){return this._$behaviors.push(e),e._$chainingFilter?e._$chainingFilter(this):this}chainingFilter(e){return this._$chainingFilter=e,this}options(e){const t=this._$options;return this._$options=t?Object.assign(Object.assign({},t),e):e,this}implement(e,t){return this._$traitBehaviors.push({traitBehavior:e,impl:t}),this}template(e){return this._$template=e,this}usingComponents(e){return this._$using?this._$using=Object.assign(Object.assign({},this._$using),e):this._$using=e,this}placeholders(e){return this._$placeholders?this._$placeholders=Object.assign(Object.assign({},this._$placeholders),e):this._$placeholders=e,this}generics(e){return this._$generics?this._$generics=Object.assign(Object.assign({},this._$generics),e):this._$generics=e,this}externalClasses(e){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(e):this._$externalClasses=e,this}data(e){return this._$data.push((t=>{var n;return null!==(n=c("Data Generator",e,null,[],t))&&void 0!==n?n:{}})),this}staticData(e){return this._$staticData=e,this}property(e,t){return this._$properties||(this._$properties=[]),this._$properties.push({name:e,def:t}),this}methods(e){const t=Object.keys(e);for(let n=0;n<t.length;n+=1){const o=t[n],s=e[o];this._$methods.push({name:o,func:s})}return this}observer(e,t,n=!1){this._$observers||(this._$observers=[]);try{this._$observers.push({dataPaths:ne(e),func:t,once:n})}catch(e){k(e,"observer",this._$is)}return this}lifetime(e,t,n=!1){return this._$lifetimes.push({name:e,func:t,once:n}),this}pageLifetime(e,t,n=!1){return this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:e,func:t,once:n}),this}relation(e,t){return this._$relations||(this._$relations=[]),this._$relations.push({name:e,rel:t}),this}init(e){return this._$init.push(e),this}definition(e){e.behaviors&&this._$behaviors.push(...e.behaviors),e.options&&this.options(e.options),e.template&&this.template(e.template),e.using&&this.usingComponents(e.using),e.placeholders&&this.placeholders(e.placeholders),e.generics&&this.generics(e.generics),e.externalClasses&&this.externalClasses(e.externalClasses);const t=e.data;void 0!==t&&("function"==typeof t?this._$data.push((e=>{var n;return null!==(n=c("Data Generator",t,null,[],e))&&void 0!==n?n:{}})):this._$staticData=t);const n=e.properties;if(void 0!==n){this._$properties||(this._$properties=[]);const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const o=e[t],s=n[o];this._$properties.push({name:o,def:s})}}const o=e.methods;if(void 0!==o){const e=Object.keys(o);for(let t=0;t<e.length;t+=1){const n=e[t],s=o[n];this._$methods.push({name:n,func:s})}}const s=e.observers;if(void 0!==s)if(this._$observers||(this._$observers=[]),Array.isArray(s))for(let e=0;e<s.length;e+=1){const{fields:t,observer:n}=s[e];try{this._$observers.push({dataPaths:ne(null!=t?t:"**"),func:n,once:!1})}catch(e){k(e,"definition",this._$is)}}else{const e=Object.keys(s);for(let t=0;t<e.length;t+=1){const n=e[t],o=s[n];try{this._$observers.push({dataPaths:ne(n),func:o,once:!1})}catch(e){k(e,"definition",this._$is)}}}const i=e.lifetimes;if(void 0===(null==i?void 0:i.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==i?void 0:i.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==i?void 0:i.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==i?void 0:i.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==i?void 0:i.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),i){const e=Object.keys(i);for(let t=0;t<e.length;t+=1){const n=e[t],o=i[n];this._$lifetimes.push({name:n,func:o,once:!0})}}const r=e.pageLifetimes;if(r){this._$pageLifetimes||(this._$pageLifetimes=[]);const e=Object.keys(r);for(let t=0;t<e.length;t+=1){const n=e[t],o=r[n];this._$pageLifetimes.push({name:n,func:o,once:!0})}}this._$listeners=e.listeners;const l=e.relations;if(l){this._$relations||(this._$relations=[]);const e=Object.keys(l);for(let t=0;t<e.length;t+=1){const n=e[t],o=l[n];this._$relations.push({name:n,rel:o})}}return this}registerBehavior(){const e=this._$is,t=new yt(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t}registerComponent(){const e=this._$is,t=new yt(this),n=new gt(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n}}class yt{static create(e,t){return new St(e.is,t||X()).definition(e).registerBehavior()}constructor(e){this._$unprepared=!0,this.is=e._$is||"",this.ownerSpace=e._$ownerSpace,this._$builder=e,this._$flatAncestors=new Set,this._$chainingFilter=e._$chainingFilter,this._$options=e._$options,this._$traitBehaviors=void 0,this._$template=e._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=e._$externalClasses,this._$staticData=void 0,this._$data=[],this._$propertyMap=Object.create(null),this._$methodMap=Object.create(null),this._$observers=[],this._$lifetimes=[],this._$pageLifetimes=void 0,this._$listeners=void 0,this._$relationMap=void 0,this._$init=[],this._$methodCallerInit=e._$methodCallerInit}general(){return this}getComponentDependencies(e){const t=new Set,n=function(e){e._$unprepared&&e.prepare();const o=Object.keys(e._$using);for(let s=0;s<o.length;s+=1){const i=o[s],r=e._$using[i];if("string"==typeof r)continue;const l=r.final;l&&!t.has(l)&&(t.add(l),n(l.behavior))}};if(n(this.general()),e){const o=Object.values(e);for(let e=0;e<o.length;e+=1){const s=o[e];"string"!=typeof s&&(t.has(s)||(t.add(s),n(s.behavior)))}}return t}static prepare(e){e.prepare()}prepare(){var e;if(!this._$unprepared)return;this._$unprepared=!1;const t=this.is,n=this.ownerSpace,o=this._$builder,s=this._$flatAncestors;if(Array.isArray(o._$behaviors))for(let e=0;e<o._$behaviors.length;e+=1){const i=o._$behaviors[e];let r=null;if(i instanceof yt)r=i;else{const e=String(i);n&&(r=n.getBehaviorByUrl(e,t)),r||k(new Error(`behavior "${e}" is not found.`),"[prepare]",t)}if(!r)continue;r._$unprepared&&yt.prepare(r);const l=r._$traitBehaviors;void 0!==l&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...l));const a=r._$staticData;a&&(this._$staticData||(this._$staticData={}),ue(this._$staticData,a)),Object.assign(this._$methodMap,r._$methodMap),Object.assign(this._$propertyMap,r._$propertyMap),this._$data.push(...r._$data);const d=r._$observers;for(let e=0;e<d.length;e+=1){const t=d[e];t.once&&this._$observers.indexOf(t)>=0||this._$observers.push(t)}const c=r._$lifetimes;for(let e=0;e<c.length;e+=1){const t=c[e];t.once&&this._$lifetimes.indexOf(t)>=0||this._$lifetimes.push(t)}const h=r._$pageLifetimes;if(void 0!==h)if(this._$pageLifetimes)for(let e=0;e<h.length;e+=1){const t=h[e];t.once&&this._$pageLifetimes.indexOf(t)>=0||this._$pageLifetimes.push(t)}else this._$pageLifetimes=h.slice();const u=r._$listeners;void 0!==u&&(this._$listeners||(this._$listeners=[]),this._$listeners.push(...u));const p=r._$relationMap;void 0!==p&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,p)),this._$init.push(...r._$init),r._$flatAncestors.forEach((e=>{s.add(e)}))}const i=o._$traitBehaviors;if(void 0!==i&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...i)),"object"==typeof o._$using&&null!==o._$using){const s="object"==typeof o._$placeholders&&null!==o._$placeholders,i=Object.keys(o._$using);for(let r=0;r<i.length;r+=1){const l=i[r],a=o._$using[l];let d=null;if(s&&(d=null!==(e=o._$placeholders[l])&&void 0!==e?e:null),a instanceof gt)this._$using[l]={final:a,source:this,placeholder:d,waiting:null};else if(n){const e=String(a),o=n.getComponentByUrlWithoutDefault(e,t);if(o)this._$using[l]={final:o,source:this,placeholder:null,waiting:null};else if(null!==d){const o={final:null,source:this,placeholder:d,waiting:null},s=n._$componentWaitingList(e,t);s&&(s.add((e=>{o.final=e,o.placeholder=null,o.waiting=null})),o.waiting=s),this._$using[l]=o}else{const t=n.getGlobalUsingComponent(e);this._$using[l]="string"==typeof t?t:{final:t,source:this,placeholder:null,waiting:null}}}else k(new Error(`cannot find component "${String(a)}"`),"[prepare]",t)}}if("object"==typeof o._$generics&&null!==o._$generics){const e=this._$generics=[],s=Object.create(null);this._$genericDefaults=s;const i=Object.keys(o._$generics);for(let r=0;r<i.length;r+=1){const l=i[r],a=o._$generics[l];let d=null;const c=!0===a||null==a?void 0:a.default;if(void 0!==c)if(c instanceof gt)d=c;else if(n){const e=String(c);d=n.getComponentByUrlWithoutDefault(e,t)||n.getGlobalUsingComponent(e)}else k(new Error(`cannot define generic "${l}" without a default implementor.`),"[prepare]",t);e.push(l),s[l]=d}}const r=o._$staticData;r&&(this._$staticData?ue(this._$staticData,r):this._$staticData=r);const l=o._$methods;for(let e=0;e<l.length;e+=1){const{name:t,func:n}=l[e];this._$methodMap[t]=n}const a=o._$properties;if(void 0!==a){const e=[];for(let n=0;n<a.length;n+=1){const{name:o,def:s}=a[n],i="string"===(d=s)||d===String?{type:"string",optionalTypes:null,value:"",default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"number"===d||d===Number?{type:"number",optionalTypes:null,value:0,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===d||d===Boolean?{type:"boolean",optionalTypes:null,value:!1,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===d||d===Object?{type:"object",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===d||d===Array?{type:"array",optionalTypes:null,value:[],default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"function"===d||d===Function?{type:"function",optionalTypes:null,value(){},default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"any"===d||null==d?{type:"any",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:null;let r;if(null!==i)r=i;else{const e=s;let n=pe(e.type),i=null;Array.isArray(e.optionalTypes)&&(i=e.optionalTypes.map(pe),i.length>0&&("invalid"!==n&&"any"!==n||(n=i[0]))),"invalid"===n&&k(new Error(`the type of property "${o}" is illegal`),"[prepare]",t);let l,a,d=e.value;void 0===e.value?d="string"===n?"":"number"===n?0:"boolean"!==n&&("array"===n?[]:null):void 0!==e.default&&O(`the initial value of property "${o}" is not used when its default is provided.`,t),"function"==typeof e.observer?l=e.observer:"string"==typeof e.observer?(l=this._$methodMap[e.observer]||null,l||k(new Error(`Cannot find method "${e.observer}" for observer of property "${o}".`),"[prepare]",t)):(l=null,void 0!==e.observer&&k(new Error(`The observer of property "${o}" is not a function, got "${typeof e.observer}".`),"[prepare]",t)),"function"==typeof e.comparer?a=e.comparer:(a=null,void 0!==e.comparer&&k(new Error(`the comparer of property "${o}" is not a function.`),"[prepare]",t));const c=!!e.reflectIdPrefix;r={type:n,optionalTypes:i,value:d,default:e.default,observer:l,comparer:a,reflectIdPrefix:c}}this._$propertyMap[o]=r,e.push({name:o,func:void 0===r.default?()=>ie(r.value):r.default})}this._$data.push((t=>{const n={};for(let o=0;o<e.length;o+=1){const{name:s,func:i}=e[o];n[s]=c(`Property "${s}" Default`,i,null,[],t)}return n}))}var d;this._$data.push(...o._$data);const h=o._$observers;if(void 0!==h)for(let e=0;e<h.length;e+=1){const{dataPaths:n,func:o,once:s}=h[e],i="function"==typeof o?o:this._$methodMap[o];"function"==typeof i?this._$observers.push({dataPaths:n,observer:i,once:s}):k(new Error(`the "${String(i)}" observer is not a function.`),"[prepare]",t)}const u=o._$lifetimes;this._$lifetimes.push(...u);const p=o._$pageLifetimes;p&&(this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push(...p));const f=o._$listeners;if(void 0!==f){const e=Object.keys(f);if(e.length>0){this._$listeners=[];for(let n=0;n<e.length;n+=1){const o=e[n],s=f[o],i="function"==typeof s?s:this._$methodMap[s];if(i){const e=o.indexOf(".");let t,n;e>=0?(t=o.slice(0,e),n=o.slice(e+1)):(t="",n=o),this._$listeners.push({id:t,ev:n,listener:i})}else k(new Error(`the "${o}" listener is not a function or a method name`),"[prepare]",t)}}}const $=o._$relations;if(void 0!==$){this._$relationMap||(this._$relationMap=Object.create(null));for(let e=0;e<$.length;e+=1){const{name:o,rel:s}=$[e];if(null==s)continue;const i=Ue(n,t,o,s);i&&(this._$relationMap[o]=i)}}this._$init.push(...o._$init),s.add(this)}getTemplate(){return this._$template}_$updateTemplate(e){this._$template=e}hasBehavior(e){if(this._$unprepared&&this.prepare(),e instanceof yt)return this._$flatAncestors.has(e);if(this.ownerSpace){const t=this.ownerSpace.getBehaviorByUrl(e,this.is);return!!t&&this._$flatAncestors.has(t)}return!1}getMethods(){return this._$methodMap}_$generateObserverTree(){const e=new ge(this._$propertyMap),t=this._$observers;for(let n=0;n<t.length;n+=1){const{dataPaths:o,observer:s}=t[n];e.addObserver(s,o)}return e}_$getAllLifetimeFuncs(){const e=Object.create(null),t=this._$lifetimes;for(let n=0;n<t.length;n+=1){const{name:o,func:s}=t[n];if(e[o])e[o].add(s);else{(e[o]=new l("lifetime")).add(s)}}return e}_$getAllPageLifetimeFuncs(){const e=Object.create(null),t=this._$pageLifetimes;if(!t)return e;for(let n=0;n<t.length;n+=1){const{name:o,func:s}=t[n];if(e[o])e[o].add(s);else{(e[o]=new l("pageLifetime")).add(s)}}return e}}var Ct;exports.ElementIteratorType=void 0,(Ct=exports.ElementIteratorType||(exports.ElementIteratorType={})).ShadowAncestors="shadow-ancestors",Ct.ComposedAncestors="composed-ancestors",Ct.ShadowDescendantsRootFirst="shadow-descendants-root-first",Ct.ShadowDescendantsRootLast="shadow-descendants-root-last",Ct.ComposedDescendantsRootFirst="composed-descendants-root-first",Ct.ComposedDescendantsRootLast="composed-descendants-root-last";class wt{constructor(e,t,n=Pe){if(!m(e)&&!g(e))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=e,this._$nodeTypeLimit=n||Pe,"shadow-ancestors"===t||"shadow-descendants-root-first"===t||"shadow-descendants-root-last"===t)this._$composed=!1;else{if("composed-ancestors"!==t&&"composed-descendants-root-first"!==t&&"composed-descendants-root-last"!==t)throw new Error(`Unrecognized iterator type "${String(t)}"`);this._$composed=!0}this._$isAncestor="shadow-ancestors"===t||"composed-ancestors"===t,this._$rootFirst="shadow-descendants-root-first"===t||"composed-descendants-root-first"===t}static create(e,t,n){return new wt(e,t,n)}forEach(e){const t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor){let o=this._$node;for(;;){if(o instanceof t&&!1===e(o))return;let s;if(s=n?o.getComposedParent():o.parentNode,!s)break;o=s}}else{const o=this._$rootFirst,s=i=>{if(o&&i instanceof t&&!1===e(i))return!1;if(m(i)){let e=!1;const t=t=>!1!==s(t)||(e=!0,!1);if(n?i.forEachComposedChild(t):i.childNodes.forEach(t),e)return!1}return!(!o&&i instanceof t&&!1===e(i))};s(this._$node)}}}var Nt=Object.freeze({__proto__:null});const Et=Me.triggerEvent,xt=Me.triggerExternalEvent;exports.Behavior=yt,exports.BehaviorBuilder=St,exports.ClassList=j,exports.Component=bt,exports.ComponentDefinition=gt,exports.ComponentSpace=K,exports.CurrentWindowBackendContext=class{constructor(){this.mode=3,this.document=document,this._$styleSheets=[],this._$styleSheetRegistry=Object.create(null),this._$delegatedEventListeners=Object.create(null),this._$elementEventListeners=new WeakMap,this._$elementCaptureEventListeners=new WeakMap,this._$triggedEvents=new WeakSet}destroy(){}getWindowWidth(){return document.documentElement.clientWidth}getWindowHeight(){return document.documentElement.clientHeight}getDevicePixelRatio(){return window.devicePixelRatio}getTheme(){return"light"}registerStyleSheetContent(e,t){this._$styleSheetRegistry[e]=String(t)}appendStyleSheetPath(e,t){const n=this._$styleSheetRegistry[e];if(void 0===n)throw new Error(`No style sheet registry "${e}"`);const o=document.createElement("style");o.type="text/css",o.innerHTML=n,void 0!==t&&o.setAttribute("wx-style-scope",String(t)),document.head.appendChild(o);const s=this._$styleSheets.length;return this._$styleSheets.push(o),s}disableStyleSheet(e){const t=this._$styleSheets[e];t&&document.head.removeChild(t)}render(e){window.requestAnimationFrame((()=>{c("Render Callback",e,this,[null])}))}getRootNode(){return document.body}associateValue(e,t){e.__wxElement=t}onEvent(e){this._$eventListener||this._$initEvent(),this._$eventListener=e}_$getEventDetail(e){const t={};let n=e;for(;Object.getPrototypeOf(n)!==Event.prototype;){const o=Object.keys(n);for(let n=0;n<o.length;n+=1){const s=o[n];"function"!=typeof e[s]&&(t[s]=e[s])}n=Object.getPrototypeOf(n)}return t}_$trigger(e,t,n,o,s){if(!this._$eventListener||!e.target)return;let i=e.target;for(;i&&!i.__wxElement;)i=i.parentNode;if(!i)return;1===this._$eventListener(i.__wxElement,t,n,{originalEvent:e,bubbles:o,composed:s,capturePhase:!0})&&e.preventDefault()}_$initEvent(){const e=Object.create(null);let t=!1;const n=(t,n)=>{e[n.identifier]={x:n.clientX,y:n.clientY}},o=(t,n)=>{const o=n.identifier;if(e[o]){const s=e[o];(Math.abs(s.x-n.clientX)>10||Math.abs(s.y-n.clientY)>10)&&(delete e[o],this._$trigger(t,"canceltap",s,!0,!0))}},s=(t,n)=>{const o=n.identifier;if(e[o]){const s=e[o];delete e[o],Math.abs(s.x-n.clientX)>10||Math.abs(s.y-n.clientY)>10?this._$trigger(t,"canceltap",s,!0,!0):this._$trigger(t,"tap",s,!0,!0)}},i=(t,n)=>{const o=n.identifier;if(e[o]){const n=e[o];delete e[o],this._$trigger(t,"canceltap",n,!0,!0)}},r=e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)s(e,t[n]);const n=e.target;n.__touchCount-=t.length,n.__touchCount<=0&&(n.__touchCount=0,n.removeEventListener("touchend",r),n.removeEventListener("touchcancel",l))},l=e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)i(e,t[n]);const n=e.target;n.__touchCount-=t.length,n.__touchCount<=0&&(n.__touchCount=0,n.removeEventListener("touchend",r),n.removeEventListener("touchcancel",l))};document.body.addEventListener("touchstart",(e=>{t=!0;const o=e.changedTouches;for(let e=0;e<o.length;e+=1)n(0,o[e]);const s=e.target;s.__touchCount||(s.__touchCount=0,s.addEventListener("touchend",r),s.addEventListener("touchcancel",l)),s.__touchCount+=o.length}),{capture:!0}),document.body.addEventListener("touchmove",(e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)o(e,t[n])}),{capture:!0}),document.body.addEventListener("mousedown",(e=>{t||n(0,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mousemove",(e=>{t||o(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mouseup",(e=>{t||s(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0})}setListenerStats(e,t,n,o){if(!e)return;const s=L.includes(t),i=2===o;if(s){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(e=>{i&&e.preventDefault(),this._$trigger(e,t,this._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}const r=n?this._$elementCaptureEventListeners:this._$elementEventListeners;r.has(e)||r.set(e,Object.create(null));const l=r.get(e);l[t]||(l[t]=!0,e.addEventListener(t,(e=>{this._$triggedEvents.has(e)||(this._$triggedEvents.add(e),i&&e.preventDefault(),this._$trigger(e,t,this._$getEventDetail(e),e.bubbles,e.composed))})))}setModelBindingStat(e,t,n){const o=(o,s)=>{if(e._$wxArgs||(e._$wxArgs={modelListeners:Object.create(null)}),void 0===e._$wxArgs.modelListeners[t]){if(!n)return;e._$wxArgs.modelListeners[t]=n,e.addEventListener(o,(()=>{var n;const o=null===(n=e._$wxArgs)||void 0===n?void 0:n.modelListeners[t];null==o||o(s())}))}e._$wxArgs.modelListeners[t]=n},s=e.tagName;let i=!1;if("INPUT"===s){const n=e,s=n.type;"checkbox"===s||"radio"===s?"checked"===t&&(i=!0,o("change",(()=>n.checked))):"value"===t&&(i=!0,o("input",(()=>n.value)))}else if("TEXTAREA"===s){const n=e;"value"===t&&(i=!0,o("input",(()=>n.value)))}else if("SELECT"===s){const n=e;"value"===t&&(i=!0,o("change",(()=>n.value)))}i||O(`unsupported model binding on "${t}" of "${s.toLowerCase()}" element.`)}createIntersectionObserver(e,t,n,o,s){const i=new IntersectionObserver((e=>{e.forEach((e=>{s({intersectionRatio:e.intersectionRatio,boundingClientRect:e.boundingClientRect,intersectionRect:e.intersectionRect,relativeRect:e.rootBounds,time:e.time})}))}),{root:t,rootMargin:n,threshold:o});return i.observe(e),{disconnect(){i.disconnect()}}}createMediaQueryObserver(e,t){let n=null;const o=()=>{const o=(()=>{const t=document.documentElement.clientWidth,n=document.documentElement.clientHeight;return(void 0===e.width||t===e.width)&&(!(void 0!==e.maxWidth&&t>e.maxWidth)&&(!(void 0!==e.minWidth&&t<e.minWidth)&&((void 0===e.width||n===e.height)&&(!(void 0!==e.maxHeight&&n>e.maxHeight)&&(!(void 0!==e.minHeight&&n<e.minHeight)&&(t>n?"landscape":"portrait")===e.orientation)))))})();n!==o&&(n=o,t({matches:o}))};return setTimeout(o,0),window.addEventListener("resize",o),{disconnect(){window.removeEventListener("resize",o)}}}getContext(e,t){t(null)}},exports.DataGroup=Ce,exports.Element=Pe,exports.ElementIterator=wt,exports.EmptyBackendContext=A,exports.EmptyComposedBackendContext=class{constructor(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new I}destroy(){}getWindowWidth(){return 1}getWindowHeight(){return 1}getDevicePixelRatio(){return 1}getTheme(){return"light"}registerStyleSheetContent(e,t){}appendStyleSheetPath(e,t){const n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n}disableStyleSheet(e){}render(e){if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{const t=this._$renderCallbacks=[e];setTimeout((()=>{this._$renderCallbacks=null,t.forEach((e=>{c("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$rootNode}createElement(e,t){return new I}createTextNode(e){return new I}createFragment(){return new I}onEvent(e){}createMediaQueryObserver(e,t){return{disconnect:()=>{}}}},exports.Event=Me,exports.FuncArr=l,exports.MutationObserver=de,exports.NativeNode=Ge,exports.Observer=de,exports.ParsedSelector=Ae,exports.ShadowRoot=ze,exports.StyleScopeManager=P,exports.TextNode=Ve,exports.TraitBehavior=G,exports.VirtualNode=We,exports.addGlobalErrorListener=function(e){E.add(e)},exports.addGlobalWarningListener=function(e){x.add(e)},exports.backend=n,exports.composedBackend=o,exports.createElement=function(e,t){return bt.create(e,t||null)},exports.dataPath=oe,exports.dataUtils=le,exports.domlikeBackend=s,exports.dumpElement=(e,t)=>{console.log(w(e,t))},exports.dumpElementToString=w,exports.dumpSingleElementToString=C,exports.getDefaultComponentSpace=X,exports.globalOptions=i,exports.registerBehavior=e=>X().defineBehavior(e),exports.registerElement=e=>X().defineComponent(e),exports.removeGlobalErrorListener=function(e){E.remove(e)},exports.removeGlobalWarningListener=function(e){x.remove(e)},exports.safeCallback=c,exports.template=ft,exports.templateEngine=Nt,exports.triggerEvent=Et,exports.triggerExternalEvent=xt,exports.triggerRender=(e,t)=>{const n=e.getBackendContext();n&&((e,t)=>{e.render((()=>{"function"==typeof t&&c("render",t,e,[null])}))})(n,t||null)},exports.typeUtils=F;
2
+ //# sourceMappingURL=glass_easel.all.js.map