@awayjs/scene 0.13.326 → 0.13.327
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.
- package/.eslintrc +100 -100
- package/README.md +61 -61
- package/bundle/awayjs-scene.umd.js +2 -2
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/copyVersionToIndex.js +23 -23
- package/dist/index.d.ts +76 -76
- package/dist/index.js +67 -67
- package/dist/lib/Scene.d.ts +85 -85
- package/dist/lib/Scene.d.ts.map +1 -1
- package/dist/lib/Scene.js +285 -285
- package/dist/lib/Settings.d.ts +15 -16
- package/dist/lib/Settings.d.ts.map +1 -1
- package/dist/lib/Settings.js +56 -60
- package/dist/lib/adapters/IDisplayObjectAdapter.d.ts +13 -13
- package/dist/lib/adapters/IDisplayObjectAdapter.js +1 -1
- package/dist/lib/adapters/IFilter.d.ts +24 -24
- package/dist/lib/adapters/IFilter.js +1 -1
- package/dist/lib/adapters/IMovieClipAdapter.d.ts +15 -15
- package/dist/lib/adapters/IMovieClipAdapter.js +1 -1
- package/dist/lib/adapters/ITextfieldAdapter.d.ts +4 -4
- package/dist/lib/adapters/ITextfieldAdapter.js +1 -1
- package/dist/lib/base/IBitmapDrawable.d.ts +11 -11
- package/dist/lib/base/IBitmapDrawable.js +1 -1
- package/dist/lib/base/IFrameLabel.d.ts +4 -4
- package/dist/lib/base/IFrameLabel.js +1 -1
- package/dist/lib/base/IFrameScript.d.ts +5 -5
- package/dist/lib/base/IFrameScript.js +1 -1
- package/dist/lib/base/MouseButtons.d.ts +26 -26
- package/dist/lib/base/MouseButtons.js +1 -1
- package/dist/lib/base/Timeline.d.ts +147 -147
- package/dist/lib/base/Timeline.js +525 -525
- package/dist/lib/base/TimelineActionType.d.ts +18 -18
- package/dist/lib/base/TimelineActionType.js +1 -1
- package/dist/lib/controllers/ControllerBase.d.ts +14 -14
- package/dist/lib/controllers/ControllerBase.js +60 -60
- package/dist/lib/controllers/FirstPersonController.d.ts +78 -78
- package/dist/lib/controllers/FirstPersonController.js +228 -228
- package/dist/lib/controllers/FollowController.d.ts +12 -12
- package/dist/lib/controllers/FollowController.js +27 -27
- package/dist/lib/controllers/HoverController.d.ts +105 -105
- package/dist/lib/controllers/HoverController.js +302 -302
- package/dist/lib/controllers/LookAtController.d.ts +14 -14
- package/dist/lib/controllers/LookAtController.js +68 -68
- package/dist/lib/controllers/SpringController.d.ts +38 -38
- package/dist/lib/controllers/SpringController.js +59 -59
- package/dist/lib/display/Billboard.d.ts +132 -132
- package/dist/lib/display/Billboard.js +397 -397
- package/dist/lib/display/Camera.d.ts +31 -31
- package/dist/lib/display/Camera.js +72 -72
- package/dist/lib/display/DisplayObject.d.ts +926 -921
- package/dist/lib/display/DisplayObject.d.ts.map +1 -1
- package/dist/lib/display/DisplayObject.js +1603 -1595
- package/dist/lib/display/DisplayObjectContainer.d.ts +325 -325
- package/dist/lib/display/DisplayObjectContainer.js +486 -486
- package/dist/lib/display/LineSegment.d.ts +69 -69
- package/dist/lib/display/LineSegment.js +203 -203
- package/dist/lib/display/LoaderContainer.d.ts +504 -504
- package/dist/lib/display/LoaderContainer.js +603 -603
- package/dist/lib/display/MorphSprite.d.ts +20 -20
- package/dist/lib/display/MorphSprite.js +246 -246
- package/dist/lib/display/MovieClip.d.ts +149 -149
- package/dist/lib/display/MovieClip.js +733 -733
- package/dist/lib/display/SimpleButton.d.ts +158 -158
- package/dist/lib/display/SimpleButton.js +228 -228
- package/dist/lib/display/Skybox.d.ts +144 -144
- package/dist/lib/display/Skybox.js +288 -288
- package/dist/lib/display/Sprite.d.ts +65 -65
- package/dist/lib/display/Sprite.js +134 -134
- package/dist/lib/display/TextField.d.ts +1104 -1104
- package/dist/lib/display/TextField.js +3019 -3019
- package/dist/lib/display/TextSprite.d.ts +16 -16
- package/dist/lib/display/TextSprite.js +36 -36
- package/dist/lib/elements/SkyboxElements.d.ts +29 -29
- package/dist/lib/elements/SkyboxElements.js +127 -127
- package/dist/lib/errors/CastError.d.ts +4 -4
- package/dist/lib/errors/CastError.js +10 -10
- package/dist/lib/events/CameraEvent.d.ts +16 -16
- package/dist/lib/events/CameraEvent.js +30 -30
- package/dist/lib/events/FocusEvent.d.ts +42 -42
- package/dist/lib/events/FocusEvent.js +43 -43
- package/dist/lib/events/KeyboardEvent.d.ts +21 -21
- package/dist/lib/events/KeyboardEvent.js +43 -43
- package/dist/lib/events/MouseEvent.d.ts +91 -91
- package/dist/lib/events/MouseEvent.js +122 -122
- package/dist/lib/events/PointerEvent.d.ts +93 -93
- package/dist/lib/events/PointerEvent.js +73 -73
- package/dist/lib/events/ResizeEvent.d.ts +15 -15
- package/dist/lib/events/ResizeEvent.js +38 -38
- package/dist/lib/events/TextfieldEvent.d.ts +19 -19
- package/dist/lib/events/TextfieldEvent.js +28 -28
- package/dist/lib/events/TouchEvent.d.ts +54 -54
- package/dist/lib/events/TouchEvent.js +89 -89
- package/dist/lib/factories/DefaultSceneGraphFactory.d.ts +27 -27
- package/dist/lib/factories/DefaultSceneGraphFactory.js +55 -55
- package/dist/lib/factories/ISceneGraphFactory.d.ts +20 -20
- package/dist/lib/factories/ISceneGraphFactory.js +1 -1
- package/dist/lib/image/SceneImage2D.d.ts +221 -220
- package/dist/lib/image/SceneImage2D.d.ts.map +1 -1
- package/dist/lib/image/SceneImage2D.js +609 -610
- package/dist/lib/managers/DefaultFontManager.d.ts +14 -14
- package/dist/lib/managers/DefaultFontManager.js +101 -101
- package/dist/lib/managers/DeviceFontManager.d.ts +8 -8
- package/dist/lib/managers/DeviceFontManager.js +44 -44
- package/dist/lib/managers/FrameScriptManager.d.ts +37 -37
- package/dist/lib/managers/FrameScriptManager.js +386 -386
- package/dist/lib/managers/IInputRecorder.d.ts +3 -3
- package/dist/lib/managers/IInputRecorder.js +1 -1
- package/dist/lib/managers/MouseManager.d.ts +74 -74
- package/dist/lib/managers/MouseManager.js +803 -803
- package/dist/lib/prefabs/PrefabBase.d.ts +19 -19
- package/dist/lib/prefabs/PrefabBase.js +42 -42
- package/dist/lib/prefabs/PrimitiveCapsulePrefab.d.ts +56 -56
- package/dist/lib/prefabs/PrimitiveCapsulePrefab.js +269 -269
- package/dist/lib/prefabs/PrimitiveConePrefab.d.ts +21 -21
- package/dist/lib/prefabs/PrimitiveConePrefab.js +43 -43
- package/dist/lib/prefabs/PrimitiveCubePrefab.d.ts +74 -74
- package/dist/lib/prefabs/PrimitiveCubePrefab.js +545 -545
- package/dist/lib/prefabs/PrimitiveCylinderPrefab.d.ts +79 -79
- package/dist/lib/prefabs/PrimitiveCylinderPrefab.js +584 -584
- package/dist/lib/prefabs/PrimitivePlanePrefab.d.ts +65 -65
- package/dist/lib/prefabs/PrimitivePlanePrefab.js +300 -300
- package/dist/lib/prefabs/PrimitivePolygonPrefab.d.ts +29 -29
- package/dist/lib/prefabs/PrimitivePolygonPrefab.js +64 -64
- package/dist/lib/prefabs/PrimitivePrefabBase.d.ts +67 -67
- package/dist/lib/prefabs/PrimitivePrefabBase.js +158 -158
- package/dist/lib/prefabs/PrimitiveSpherePrefab.d.ts +48 -48
- package/dist/lib/prefabs/PrimitiveSpherePrefab.js +294 -294
- package/dist/lib/prefabs/PrimitiveTorusPrefab.d.ts +55 -55
- package/dist/lib/prefabs/PrimitiveTorusPrefab.js +260 -260
- package/dist/lib/text/AntiAliasType.d.ts +24 -24
- package/dist/lib/text/AntiAliasType.js +28 -28
- package/dist/lib/text/BitmapFontChar.d.ts +39 -39
- package/dist/lib/text/BitmapFontChar.js +42 -42
- package/dist/lib/text/BitmapFontTable.d.ts +73 -73
- package/dist/lib/text/BitmapFontTable.js +183 -183
- package/dist/lib/text/FNTGenerator.d.ts +10 -10
- package/dist/lib/text/FNTGenerator.js +74 -74
- package/dist/lib/text/FNTGeneratorCanvas.d.ts +22 -22
- package/dist/lib/text/FNTGeneratorCanvas.js +211 -211
- package/dist/lib/text/FNTGeneratrorBase.d.ts +7 -7
- package/dist/lib/text/FNTGeneratrorBase.js +7 -7
- package/dist/lib/text/Font.d.ts +38 -38
- package/dist/lib/text/Font.js +109 -109
- package/dist/lib/text/FontLookUpMode.d.ts +5 -5
- package/dist/lib/text/FontLookUpMode.js +7 -7
- package/dist/lib/text/FontStyleName.d.ts +6 -6
- package/dist/lib/text/FontStyleName.js +7 -7
- package/dist/lib/text/GridFitType.d.ts +31 -31
- package/dist/lib/text/GridFitType.js +35 -35
- package/dist/lib/text/HTMLTextProcessor.d.ts +8 -8
- package/dist/lib/text/HTMLTextProcessor.js +426 -426
- package/dist/lib/text/IFontTable.d.ts +16 -16
- package/dist/lib/text/IFontTable.js +1 -1
- package/dist/lib/text/TesselatedFontChar.d.ts +58 -58
- package/dist/lib/text/TesselatedFontChar.js +66 -66
- package/dist/lib/text/TesselatedFontTable.d.ts +88 -88
- package/dist/lib/text/TesselatedFontTable.js +963 -963
- package/dist/lib/text/TextFieldAutoSize.d.ts +28 -28
- package/dist/lib/text/TextFieldAutoSize.js +32 -32
- package/dist/lib/text/TextFieldType.d.ts +20 -20
- package/dist/lib/text/TextFieldType.js +24 -24
- package/dist/lib/text/TextFormat.d.ts +273 -273
- package/dist/lib/text/TextFormat.js +449 -449
- package/dist/lib/text/TextFormatAlign.d.ts +26 -26
- package/dist/lib/text/TextFormatAlign.js +30 -30
- package/dist/lib/text/TextInteractionMode.d.ts +21 -21
- package/dist/lib/text/TextInteractionMode.js +25 -25
- package/dist/lib/text/TextLineMetrics.d.ts +61 -61
- package/dist/lib/text/TextLineMetrics.js +42 -42
- package/dist/lib/text/TextShape.d.ts +22 -22
- package/dist/lib/text/TextShape.js +75 -75
- package/dist/lib/tools/Merge.d.ts +81 -81
- package/dist/lib/tools/Merge.js +266 -266
- package/dist/lib/utils/Cast.d.ts +20 -20
- package/dist/lib/utils/Cast.js +271 -271
- package/index.ts +92 -92
- package/lib/Scene.ts +340 -339
- package/lib/Settings.ts +77 -83
- package/lib/adapters/IDisplayObjectAdapter.ts +23 -23
- package/lib/adapters/IFilter.ts +25 -25
- package/lib/adapters/IMovieClipAdapter.ts +26 -26
- package/lib/adapters/ITextfieldAdapter.ts +6 -6
- package/lib/base/IBitmapDrawable.ts +13 -13
- package/lib/base/IFrameLabel.ts +3 -3
- package/lib/base/IFrameScript.ts +4 -4
- package/lib/base/MouseButtons.ts +31 -31
- package/lib/base/Timeline.ts +715 -715
- package/lib/base/TimelineActionType.ts +18 -18
- package/lib/controllers/ControllerBase.ts +66 -66
- package/lib/controllers/FirstPersonController.ts +241 -241
- package/lib/controllers/FollowController.ts +22 -22
- package/lib/controllers/HoverController.ts +304 -304
- package/lib/controllers/LookAtController.ts +75 -75
- package/lib/controllers/SpringController.ts +91 -91
- package/lib/display/Billboard.ts +468 -468
- package/lib/display/Camera.ts +75 -75
- package/lib/display/DisplayObject.ts +1843 -1829
- package/lib/display/DisplayObjectContainer.ts +546 -546
- package/lib/display/LineSegment.ts +229 -229
- package/lib/display/LoaderContainer.ts +651 -651
- package/lib/display/MorphSprite.ts +339 -339
- package/lib/display/MovieClip.ts +870 -870
- package/lib/display/SimpleButton.ts +224 -224
- package/lib/display/Skybox.ts +352 -352
- package/lib/display/Sprite.ts +154 -154
- package/lib/display/TextField.ts +3876 -3876
- package/lib/display/TextSprite.ts +34 -34
- package/lib/elements/SkyboxElements.ts +141 -141
- package/lib/errors/CastError.ts +6 -6
- package/lib/events/CameraEvent.ts +29 -29
- package/lib/events/FocusEvent.ts +69 -69
- package/lib/events/KeyboardEvent.ts +40 -40
- package/lib/events/MouseEvent.ts +144 -144
- package/lib/events/PointerEvent.ts +145 -145
- package/lib/events/ResizeEvent.ts +31 -31
- package/lib/events/TextfieldEvent.ts +28 -28
- package/lib/events/TouchEvent.ts +103 -103
- package/lib/factories/DefaultSceneGraphFactory.ts +58 -58
- package/lib/factories/ISceneGraphFactory.ts +28 -28
- package/lib/image/SceneImage2D.ts +912 -912
- package/lib/managers/DefaultFontManager.ts +124 -124
- package/lib/managers/DeviceFontManager.ts +55 -55
- package/lib/managers/FrameScriptManager.ts +440 -440
- package/lib/managers/IInputRecorder.ts +2 -2
- package/lib/managers/MouseManager.ts +942 -942
- package/lib/prefabs/PrefabBase.ts +47 -47
- package/lib/prefabs/PrimitiveCapsulePrefab.ts +286 -286
- package/lib/prefabs/PrimitiveConePrefab.ts +37 -37
- package/lib/prefabs/PrimitiveCubePrefab.ts +630 -630
- package/lib/prefabs/PrimitiveCylinderPrefab.ts +657 -657
- package/lib/prefabs/PrimitivePlanePrefab.ts +352 -352
- package/lib/prefabs/PrimitivePolygonPrefab.ts +53 -53
- package/lib/prefabs/PrimitivePrefabBase.ts +177 -177
- package/lib/prefabs/PrimitiveSpherePrefab.ts +336 -336
- package/lib/prefabs/PrimitiveTorusPrefab.ts +282 -282
- package/lib/text/AntiAliasType.ts +24 -24
- package/lib/text/BitmapFontChar.ts +53 -53
- package/lib/text/BitmapFontTable.ts +213 -213
- package/lib/text/FNTGenerator.ts +100 -100
- package/lib/text/FNTGeneratorCanvas.ts +292 -292
- package/lib/text/FNTGeneratrorBase.ts +10 -10
- package/lib/text/Font.ts +114 -114
- package/lib/text/FontLookUpMode.ts +5 -5
- package/lib/text/FontStyleName.ts +6 -6
- package/lib/text/GridFitType.ts +32 -32
- package/lib/text/HTMLTextProcessor.ts +421 -421
- package/lib/text/IFontTable.ts +17 -17
- package/lib/text/TesselatedFontChar.ts +80 -80
- package/lib/text/TesselatedFontTable.ts +1181 -1181
- package/lib/text/TextFieldAutoSize.ts +30 -30
- package/lib/text/TextFieldType.ts +21 -21
- package/lib/text/TextFormat.ts +603 -603
- package/lib/text/TextFormatAlign.ts +28 -28
- package/lib/text/TextInteractionMode.ts +21 -21
- package/lib/text/TextLineMetrics.ts +74 -74
- package/lib/text/TextShape.ts +91 -91
- package/lib/tools/Merge.ts +311 -311
- package/lib/utils/Cast.ts +304 -304
- package/package.json +74 -74
- package/rollup.config.js +33 -33
- package/scripts/build.sh +2 -2
- package/scripts/gendocs.sh +14 -14
- package/scripts/genexamples.sh +14 -14
- package/scripts/genfull.sh +14 -14
- package/system.config.js +51 -51
- package/tsconfig.json +18 -18
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@awayjs/core"),require("@awayjs/stage"),require("@awayjs/view"),require("@awayjs/graphics"),require("@awayjs/renderer"),require("@awayjs/materials")):"function"==typeof define&&define.amd?define(["exports","@awayjs/core","@awayjs/stage","@awayjs/view","@awayjs/graphics","@awayjs/renderer","@awayjs/materials"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).AwayjsScene={},t.AwayjsCore,t.AwayjsStage,t.AwayjsView,t.AwayjsGraphics,t.AwayjsRenderer,t.AwayjsMaterials)}(this,(function(t,e,i,r,s,n,o){"use strict";var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},a(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}"function"==typeof SuppressedError&&SuppressedError;var h,c,u=function(t){function i(){var e=t.call(this)||this;return e._pObjects=new Array,e}return l(i,t),i.prototype.getNewObject=function(){var t=this._pCreateObject();return this._pObjects.push(t),t},i.prototype._pCreateObject=function(){throw new e.AbstractMethodError},i.prototype._iValidate=function(){},i}(e.AssetBase),p=function(t){function r(e,r){void 0===e&&(e=null),void 0===r&&(r="triangle");var s=t.call(this)||this;if(s._primitiveDirty=!0,s._uvDirty=!0,s._scaleU=1,s._scaleV=1,s._material=e,s._elementsType=r,s._elementsType==n.ElementsType.TRIANGLE){var o=new n.TriangleElements(new i.AttributesBuffer);o.autoDeriveNormals=!1,o.autoDeriveTangents=!1,s._elements=o}else s._elementsType==n.ElementsType.LINE&&(s._elements=new n.LineElements(new i.AttributesBuffer));return s}return l(r,t),Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elementsType",{get:function(){return this._elementsType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"material",{get:function(){return this._material},set:function(t){if(t!=this._material){this._material=t;for(var e=this._pObjects.length,i=0;i<e;i++)this._pObjects[i].material=this._material}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleU",{get:function(){return this._scaleU},set:function(t){this._scaleU!=t&&(this._scaleU=t,this._pInvalidateUVs())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleV",{get:function(){return this._scaleV},set:function(t){this._scaleV!=t&&(this._scaleV=t,this._pInvalidateUVs())},enumerable:!1,configurable:!0}),r.prototype._pBuildGraphics=function(t,i){throw new e.AbstractMethodError},r.prototype._pBuildUVs=function(t,i){throw new e.AbstractMethodError},r.prototype._pInvalidatePrimitive=function(){this._primitiveDirty=!0},r.prototype._pInvalidateUVs=function(){this._uvDirty=!0},r.prototype.updateGraphics=function(){this._pBuildGraphics(this._elements,this._elementsType),this._primitiveDirty=!1},r.prototype.updateUVs=function(){this._pBuildUVs(this._elements,this._elementsType),this._uvDirty=!1},r.prototype._iValidate=function(){this._primitiveDirty&&this.updateGraphics(),this._uvDirty&&this.updateUVs()},r.prototype._pCreateObject=function(){var t=new y(null,this._material);return t.graphics.addShape(s.Shape.getShape(this._elements)),t._iSourcePrefab=this,t},r.assetType="[asset PrimitivePrefab]",r}(u),d=function(t){function e(e,i,r,s,n,o,a,l,h){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=100),void 0===n&&(n=100),void 0===o&&(o=1),void 0===a&&(a=1),void 0===l&&(l=1),void 0===h&&(h=!0);var c=t.call(this,e,i)||this;return c._width=r,c._height=s,c._depth=n,c._segmentsW=o,c._segmentsH=a,c._segmentsD=l,c._tile6=h,c}return l(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this._depth},set:function(t){this._depth=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tile6",{get:function(){return this._tile6},set:function(t){this._tile6=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsD",{get:function(){return this._segmentsD},set:function(t){this._segmentsD=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v=0,x=this._width/2,w=this._height/2,E=this._depth/2;if(e==n.ElementsType.TRIANGLE){var A=t,D=2*((this._segmentsW+1)*(this._segmentsH+1)+(this._segmentsW+1)*(this._segmentsD+1)+(this._segmentsH+1)*(this._segmentsD+1)),T=12*(this._segmentsW*this._segmentsH+this._segmentsW*this._segmentsD+this._segmentsH*this._segmentsD);for(D==A.numVertices&&null!=A.indices?(A.invalidateIndices(),A.invalidateVertices(A.positions),A.invalidateVertices(A.normals),A.invalidateVertices(A.tangents)):(A.setIndices(new Uint16Array(T)),A.setPositions(new Float32Array(3*D)),A.setNormals(new Float32Array(3*D)),A.setTangents(new Float32Array(3*D)),this._pInvalidateUVs()),i=A.indices.get(A.numElements),r=A.positions.get(D),s=A.normals.get(D),o=A.tangents.get(D),a=A.concatenatedBuffer.stride/4,_=0,f=0,g=this._width/this._segmentsW,m=this._height/this._segmentsH,y=this._depth/this._segmentsD,p=0;p<=this._segmentsW;p++)for(b=p*g-x,d=0;d<=this._segmentsH;d++)r[_]=b,r[_+1]=d*m-w,r[_+2]=-E,s[_]=0,s[_+1]=0,s[_+2]=-1,o[_]=1,o[_+1]=0,o[_+2]=0,r[_+=a]=b,r[_+1]=d*m-w,r[_+2]=E,s[_]=0,s[_+1]=0,s[_+2]=1,o[_]=-1,o[_+1]=0,o[_+2]=0,_+=a,p&&d&&(c=(l=2*((p-1)*(this._segmentsH+1)+(d-1)))+2,u=(h=2*(p*(this._segmentsH+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1);for(v+=2*(this._segmentsW+1)*(this._segmentsH+1),p=0;p<=this._segmentsW;p++)for(b=p*g-x,d=0;d<=this._segmentsD;d++)r[_]=b,r[_+1]=w,r[_+2]=d*y-E,s[_]=0,s[_+1]=1,s[_+2]=0,o[_]=1,o[_+1]=0,o[_+2]=0,r[_+=a]=b,r[_+1]=-w,r[_+2]=d*y-E,s[_]=0,s[_+1]=-1,s[_+2]=0,o[_]=1,o[_+1]=0,o[_+2]=0,_+=a,p&&d&&(c=(l=v+2*((p-1)*(this._segmentsD+1)+(d-1)))+2,u=(h=v+2*(p*(this._segmentsD+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1);for(v+=2*(this._segmentsW+1)*(this._segmentsD+1),p=0;p<=this._segmentsD;p++)for(b=E-p*y,d=0;d<=this._segmentsH;d++)r[_]=-x,r[_+1]=d*m-w,r[_+2]=b,s[_]=-1,s[_+1]=0,s[_+2]=0,o[_]=0,o[_+1]=0,o[_+2]=-1,r[_+=a]=x,r[_+1]=d*m-w,r[_+2]=b,s[_]=1,s[_+1]=0,s[_+2]=0,o[_]=0,o[_+1]=0,o[_+2]=1,_+=a,p&&d&&(c=(l=v+2*((p-1)*(this._segmentsH+1)+(d-1)))+2,u=(h=v+2*(p*(this._segmentsH+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1)}else if(e==n.ElementsType.LINE){var S=t,C=4*this._segmentsH+4*this._segmentsW+4*this._segmentsD;r=new Float32Array(6*C);var P=new Float32Array(C);for(_=0,f=0,p=0;p<this._segmentsH;++p)r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,r[_++]=x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,P[f++]=1,r[_++]=-x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsW;++p)r[_++]=p*this._width/this._segmentsW-x,r[_++]=-w,r[_++]=-E,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=-E,P[f++]=1,r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=E,r[_++]=x-p*this._width/this._segmentsW,r[_++]=w,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsH;++p)r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=E,P[f++]=1,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=-E,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsD;++p)r[_++]=x,r[_++]=-w,r[_++]=p*this._depth/this._segmentsD-E,r[_++]=x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,P[f++]=1,r[_++]=-x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,r[_++]=-x,r[_++]=w,r[_++]=E-p*this._depth/this._segmentsD,P[f++]=1;for(p=0;p<this._segmentsD;++p)r[_++]=-x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,r[_++]=x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,P[f++]=1,r[_++]=-x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,r[_++]=x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,P[f++]=1;for(p=0;p<this._segmentsW;++p)r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=-E,r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=E,P[f++]=1,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=-E,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=E,P[f++]=1;S.setPositions(r),S.setThickness(P)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y;if(e==n.ElementsType.TRIANGLE){y=2*((this._segmentsW+1)*(this._segmentsH+1)+(this._segmentsW+1)*(this._segmentsD+1)+(this._segmentsH+1)*(this._segmentsD+1));var b=t;for(b.uvs&&y==b.numVertices?b.invalidateVertices(b.uvs):b.setUVs(new Float32Array(2*y)),o=b.uvs.get(y),a=b.uvs.stride,this._tile6?(l=c=1/3,h=u=.5):(l=h=1,c=u=0),s=0,p=1*c,d=1*u,_=2*c,f=0*u,g=l/this._segmentsW,m=h/this._segmentsH,i=0;i<=this._segmentsW;i++)for(r=0;r<=this._segmentsH;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+(l-i*g))*this._scaleU,o[s+1]=(f+(h-r*m))*this._scaleV,s+=a;for(p=1*c,d=0*u,_=0*c,f=0*u,g=l/this._segmentsW,m=h/this._segmentsD,i=0;i<=this._segmentsW;i++)for(r=0;r<=this._segmentsD;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+i*g)*this._scaleU,o[s+1]=(f+r*m)*this._scaleV,s+=a;for(p=0*c,d=1*u,_=2*c,f=1*u,g=l/this._segmentsD,m=h/this._segmentsH,i=0;i<=this._segmentsD;i++)for(r=0;r<=this._segmentsH;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+(l-i*g))*this._scaleU,o[s+1]=(f+(h-r*m))*this._scaleV,s+=a}else n.ElementsType.LINE},e}(p),_=function(t){function e(e,i,r,s,n,o){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=16),void 0===n&&(n=12),void 0===o&&(o=!0);var a=t.call(this,e,i)||this;return a._radius=r,a._segmentsW=s,a._segmentsH=n,a._yUp=o,a}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_;if(e==n.ElementsType.TRIANGLE){var f=t;(_=(this._segmentsH+1)*(this._segmentsW+1))==f.numVertices&&null!=f.indices?(f.invalidateIndices(),f.invalidateVertices(f.positions),f.invalidateVertices(f.normals),f.invalidateVertices(f.tangents)):(f.setIndices(new Uint16Array((this._segmentsH-1)*this._segmentsW*6)),f.setPositions(new Float32Array(3*_)),f.setNormals(new Float32Array(3*_)),f.setTangents(new Float32Array(3*_)),this._pInvalidateUVs()),i=f.indices.get(f.numElements),r=f.positions.get(_),s=f.normals.get(_),o=f.tangents.get(_),a=f.concatenatedBuffer.stride/4,c=0,u=0;var g=void 0,m=void 0,y=void 0;for(h=0;h<=this._segmentsH;++h){g=c;var b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(l=0;l<=this._segmentsW;++l){var w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=x*Math.sin(w),D=1/Math.sqrt(E*E+A*A+v*v),T=Math.sqrt(A*A+E*E);if(this._yUp?(m=0,y=T>.007?E/T:0,p=-v,d=A):(m=T>.007?E/T:0,y=0,p=A,d=v),l==this._segmentsW?(r[c]=r[g],r[c+1]=r[g+1],r[c+2]=r[g+2],s[c]=s[g]+E*D*.5,s[c+1]=s[g+1]+p*D*.5,s[c+2]=s[g+2]+d*D*.5,o[c]=T>.007?-A/T:1,o[c+1]=m,o[c+2]=y):(r[c]=E,r[c+1]=p,r[c+2]=d,s[c]=E*D,s[c+1]=p*D,s[c+2]=d*D,o[c]=T>.007?-A/T:1,o[c+1]=m,o[c+2]=y),l>0&&h>0){var S=(this._segmentsW+1)*h+l,C=(this._segmentsW+1)*h+l-1,P=(this._segmentsW+1)*(h-1)+l-1,I=(this._segmentsW+1)*(h-1)+l;h==this._segmentsH?(r[c]=r[g],r[c+1]=r[g+1],r[c+2]=r[g+2],i[u++]=S,i[u++]=P,i[u++]=I):1==h?(i[u++]=S,i[u++]=C,i[u++]=P):(i[u++]=S,i[u++]=C,i[u++]=P,i[u++]=S,i[u++]=P,i[u++]=I)}c+=a}}}else if(e==n.ElementsType.LINE){var O=t,N=this._segmentsH*this._segmentsW*2+this._segmentsW,L=new Float32Array(6*N),M=new Float32Array(N);for(c=0,u=0,h=0;h<=this._segmentsH;++h){b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(l=0;l<=this._segmentsW;++l){w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=x*Math.sin(w);if(this._yUp?(p=-v,d=A):(p=A,d=v),l>0&&(L[c++]=E,L[c++]=p,L[c++]=d,M[u++]=1,h>0)){var F=1==h?3-(6*(this._segmentsW-l)+12*l):3-12*this._segmentsW;L[c]=L[c+++F],L[c]=L[c+++F],L[c]=L[c+++F],L[c++]=E,L[c++]=p,L[c++]=d,M[u++]=1}l<this._segmentsW&&(L[c++]=E,L[c++]=p,L[c++]=d)}}O.setPositions(L),O.setThickness(M)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a=(this._segmentsH+1)*(this._segmentsW+1);if(e==n.ElementsType.TRIANGLE){a=(this._segmentsH+1)*(this._segmentsW+1);var l=t;l.uvs&&a==l.numVertices?l.invalidateVertices(l.uvs):l.setUVs(new Float32Array(2*a)),s=l.uvs.get(a),o=l.uvs.stride;var h=0;for(r=0;r<=this._segmentsH;++r)for(i=0;i<=this._segmentsW;++i)s[h]=i/this._segmentsW*this._scaleU,s[h+1]=r/this._segmentsH*this._scaleV,h+=o}else n.ElementsType.LINE},e}(p),f=e.ConfigManager.instance.addStore("scene",{ALLOW_FORCE_MSAA:8,MSAA_MINIMAL_IMAGE_SIZE:300,ALLOW_APPROXIMATION:0,USE_UNSAFE_CACHE_AS_BITMAP:!1,USE_UNSAFE_SCALE_9_SLICE:!1,USE_UNSAFE_FILTERS:!1,USE_UNSAFE_BLENDS:!1,REMAP_BLEND_MODE:!0,BLEND_MODE_REMAP_TABLE:(h={},h[i.BlendMode.DARKEN]=i.BlendMode.MULTIPLY,h),CPU_COPY_PIXELS_COUNT:4096,FONT_TESSELATION_QUALITY:.1,USE_UNSAFE_FNT:!1,TEXT_SHAPE_ROUND_PRECISION:.1}),g=function(t){function s(){var s=t.call(this)||this;return s._renderObjects={},s._containerNodes={},s._mouseChildren=!0,s._sessionID=-1,s._avmDepthID=-1,s._alignmentMode=r.AlignmentMode.REGISTRATION_POINT,s._visible=!0,s._maskId=-1,s._mouseEnabled=!0,s._maskMode=!1,s.isSlice9ScaledMC=!1,s.isSlice9ScaledSprite=!1,s.isAVMScene=!1,s.placeObjectTag=null,s._blendMode=i.BlendMode.NORMAL,s.castsShadows=!0,s._filters=null,s.orientationMode=r.OrientationMode.DEFAULT,s.zOffset=0,s.hasDispatchedAddedToStage=!1,s.cursorType="",s._isInFocus=!1,s._tabEnabled=!1,s._tabIndex=-1,s._avmDepthID=-1,s._onInvalidatePropertiesDelegate=function(t){return s._onInvalidateProperties(t)},s._onInvalidateImagesDelegate=function(t){return s._onInvalidateImages(t)},s._transform=new e.Transform(null),s._transform.addEventListener(e.TransformEvent.INVALIDATE_MATRIX3D,(function(t){return s._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)})),s._transform.addEventListener(e.TransformEvent.INVALIDATE_COLOR_TRANSFORM,(function(t){return s._invalidateHierarchicalProperty(r.HierarchicalProperty.COLOR_TRANSFORM)})),s._defaultBoundingVolume=s._getDefaultBoundingVolume(),s}return l(s,t),s.prototype.getScriptPrecedence=function(){if(!this._parent)return[];var t=this._parent.getScriptPrecedence();return this.placeObjectTag&&t.push(this.placeObjectTag.actionBlocksPrecedence),t},s.prototype.getMouseCursor=function(){return"initial"},Object.defineProperty(s.prototype,"tabEnabled",{get:function(){return this._tabEnabled},set:function(t){this._tabEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(t){this._tabIndex=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInFocus",{get:function(){return this._isInFocus},set:function(t){this._isInFocus=t},enumerable:!1,configurable:!0}),s.prototype.setFocus=function(t,e,i){this._isInFocus!=t&&(this._isInFocus=t)},Object.defineProperty(s.prototype,"alignmentMode",{get:function(){return this._alignmentMode},set:function(t){this._alignmentMode!=t&&(this._alignmentMode=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"alpha",{get:function(){return this._transform.colorTransform.alphaMultiplier},set:function(t){this._transform.colorTransform.alphaMultiplier=t,this._transform.invalidateColorTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"blendMode",{get:function(){return f.USE_UNSAFE_BLENDS?f.REMAP_BLEND_MODE&&f.BLEND_MODE_REMAP_TABLE[this._blendMode]||this._blendMode:""},set:function(t){this._blendMode!==t&&(this._blendMode=t,t===i.BlendMode.OVERLAY&&this._transform.invalidateColorTransform(),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"defaultBoundingVolume",{get:function(){return this._defaultBoundingVolume},set:function(t){this._defaultBoundingVolume!=t&&(this._defaultBoundingVolume=t,this._boundsPrimitive&&(this._boundsPrimitive.dispose(),this._boundsPrimitive=null),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"cacheAsBitmap",{get:function(){return this._bitmapCache},set:function(t){t!==this._bitmapCache&&f.USE_UNSAFE_CACHE_AS_BITMAP&&(t&&console.warn("[@scene/DisplayObject] Unsafe cacheAsBitmap is enabled!You can disable it by `Settings.USE_UNSAFE_CACHE_AS_BITMAP = false`",this.id),this._bitmapCache=t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"eulers",{get:function(){return this._eulers||(this._eulers=new e.Vector3D),this._eulers.x=this.rotationX,this._eulers.y=this.rotationY,this._eulers.z=this.rotationZ,this._eulers},set:function(t){this._transform.rotation.x=t.x,this._transform.rotation.y=t.y,this._transform.rotation.z=t.z,this._transform.invalidateMatrix3D()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"filters",{get:function(){return this._filters},set:function(t){f.USE_UNSAFE_FILTERS&&(this._filters=t,this._invalidateStyle())},enumerable:!1,configurable:!0}),s.prototype.updateFilters=function(t){console.warn("[scene/DisplayObject] - updateFilters is just a stub")},Object.defineProperty(s.prototype,"index",{get:function(){return this._parent?this._parent.getChildIndex(this):0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"loader",{get:function(){return this._loader},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask!==t&&(this._mask&&(this._mask.maskMode=!1),this._mask=t,t&&(t.maskMode=!0),this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"maskMode",{get:function(){return this._maskMode},set:function(t){this._maskMode!=t&&(this._maskMode=t,this._maskId=t?this.id:-1,this._updateMaskMode())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pickObject",{get:function(){return this._pickObject},set:function(t){this._pickObject!=t&&(this._pickObject=t==this?null:t.pickObjectFromTimeline?t.clone():t,this._pickObject&&(this._pickObject.mouseChildren=!1,this._pickObject.mouseEnabled=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseEnabled",{get:function(){return this._mouseEnabled},set:function(t){this._mouseEnabled!=t&&(this._mouseEnabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseX",{get:function(){return this._mouseX},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseY",{get:function(){return this._mouseY},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"name",{get:function(){return this._pName?this._pName:""},set:function(t){this._pName=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"registrationPoint",{get:function(){return this._registrationMatrix3D?new e.Vector3D(-this._registrationMatrix3D._rawData[12]*this.scaleX,-this._registrationMatrix3D._rawData[13]*this.scaleY,-this._registrationMatrix3D._rawData[14]*this.scaleZ):null},set:function(t){if(t)this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[12]=-t.x/this._transform.scale.x,this._registrationMatrix3D._rawData[13]=-t.y/this._transform.scale.y,this._registrationMatrix3D._rawData[14]=-t.z/this._transform.scale.z;else{if(!this._registrationMatrix3D)return;this._registrationMatrix3D._rawData[12]=0,this._registrationMatrix3D._rawData[13]=0,this._registrationMatrix3D._rawData[14]=0,this._registrationMatrix3D.isIdentity()&&(this._registrationMatrix3D=null)}this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"registrationScale",{get:function(){return this._registrationMatrix3D?new e.Vector3D(this._registrationMatrix3D._rawData[0],this._registrationMatrix3D._rawData[5],this._registrationMatrix3D._rawData[10]):null},set:function(t){if(t)this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[0]=t.x,this._registrationMatrix3D._rawData[5]=t.y,this._registrationMatrix3D._rawData[10]=t.z;else{if(!this._registrationMatrix3D)return;this._registrationMatrix3D._rawData[0]=1,this._registrationMatrix3D._rawData[5]=1,this._registrationMatrix3D._rawData[10]=1,this._registrationMatrix3D.isIdentity()&&(this._registrationMatrix3D=null)}this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"root",{get:function(){return this._root},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationX",{get:function(){return this._transform.rotation.x},set:function(t){this.rotationX!=t&&(this._transform.rotation.x=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationY",{get:function(){return this._transform.rotation.y},set:function(t){this.rotationY!=t&&(this._transform.rotation.y=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationZ",{get:function(){return this._transform.rotation.z},set:function(t){this.rotationZ!=t&&(this._transform.rotation.z=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scale9Grid",{get:function(){return this._scale9Grid},set:function(t){this._scale9Grid=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCALE9)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleX",{get:function(){return this._transform.scale.x},set:function(t){this._setScaleX(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleY",{get:function(){return this._transform.scale.y},set:function(t){this._setScaleY(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleZ",{get:function(){return this._transform.scale.z},set:function(t){this._setScaleZ(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewX",{get:function(){return this._transform.skew.x},set:function(t){this.skewX!=t&&(this._transform.skew.x=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewY",{get:function(){return this._transform.skew.y},set:function(t){this.skewY!=t&&(this._transform.skew.y=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewZ",{get:function(){return this._transform.skew.z},set:function(t){this.skewZ!=t&&(this._transform.skew.z=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scrollRect",{get:function(){var t;return null===(t=this._scrollRect)||void 0===t?void 0:t.clone()},set:function(t){var e=!0;!!this._scrollRect!=!!t?(this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS),this._scrollRect=null==t?void 0:t.clone()):this._scrollRect&&!this._scrollRect.equals(t)?this._scrollRect.copyFrom(t):e=!1,e&&(this._transform.invalidatePosition(),t?(this._scrollRectPrimitive||(this._scrollRectPrimitive=new y,this._scrollRectPrimitive.maskMode=!0),this._scrollRectPrimitive.graphics.clear(),this._scrollRectPrimitive.graphics.beginFill(255,1),this._scrollRectPrimitive.graphics.drawRect(t.x,t.y,t.width,t.height),this._scrollRectPrimitive.graphics.endFill()):this._scrollRectPrimitive&&(this._scrollRectPrimitive=null))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"material",{get:function(){return this._material},set:function(t){this._material!=t&&(this._material=t,this._invalidateMaterial())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"style",{get:function(){return this._style},set:function(t){this._style!=t&&(this._style&&(this._style.removeEventListener(n.StyleEvent.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this._style.removeEventListener(n.StyleEvent.INVALIDATE_IMAGES,this._onInvalidateImagesDelegate)),this._style=t,this._style&&(this._style.addEventListener(n.StyleEvent.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this._style.addEventListener(n.StyleEvent.INVALIDATE_IMAGES,this._onInvalidateImagesDelegate)),this._invalidateStyle())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"boundsVisible",{get:function(){return this._boundsVisible},set:function(t){t!=this._boundsVisible&&(this._boundsVisible=t,this.invalidate())},enumerable:!1,configurable:!0}),s.prototype.getScrollRectPrimitive=function(){return this._scrollRectPrimitive},s.prototype.getBoundsPrimitive=function(t){if(null==this._boundsPrimitive){switch(this._defaultBoundingVolume){case r.BoundingVolumeType.BOX:case r.BoundingVolumeType.BOX_BOUNDS:case r.BoundingVolumeType.BOX_BOUNDS_FAST:case r.BoundingVolumeType.BOX_FAST:this._boundsPrefab=new d(null,n.ElementsType.LINE),this._boundsPrimitive=this._boundsPrefab.getNewObject();break;case r.BoundingVolumeType.SPHERE:case r.BoundingVolumeType.SPHERE_BOUNDS:case r.BoundingVolumeType.SPHERE_BOUNDS_FAST:case r.BoundingVolumeType.SPHERE_FAST:this._boundsPrefab=new _(null,n.ElementsType.LINE),this._boundsPrimitive=this._boundsPrefab.getNewObject()}this._boundsPrefabDirty=!0}return this._boundsPrefabDirty&&this._updateBoundsPrefab(t),this._boundsPrimitive},Object.defineProperty(s.prototype,"transform",{get:function(){return this._transform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible!=t&&(this._visible=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.VISIBLE))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"timelineMasks",{get:function(){return this._timelineMasks},set:function(t){var e=this._timelineMasks?this._timelineMasks:[];if(t)for(var i=t.length-1;i>=0;i--){var s=t[i];if(s){var n=e.indexOf(s);-1!=n?e.splice(n,1):s.maskMode=!0}else console.warn("[DisplayObject] Timeline mask has null value, skipping it"),t.splice(i,1)}for(i=e.length-1;i>=0;i--)e[i].maskMode=!1;this._timelineMasks=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseChildren",{get:function(){return this._mouseChildren},set:function(t){this._mouseChildren!=t&&(this._mouseChildren=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.MOUSE_ENABLED))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"x",{get:function(){return this._transform.position.x},set:function(t){this._transform.position.x!=t&&(this._transform.matrix3D._rawData[12]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this._transform.position.y},set:function(t){this._transform.position.y!=t&&(this._transform.matrix3D._rawData[13]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"z",{get:function(){return this._transform.position.z},set:function(t){this._transform.position.z!=t&&(this._transform.matrix3D._rawData[14]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),s.prototype.advanceFrame=function(){},s.prototype.getEntity=function(){this._iController&&this._iController.update()},s.prototype._initNode=function(t){},s.prototype.clone=function(){var t=new s;return this.copyTo(t),t},s.prototype.copyTo=function(t){var e;t.defaultBoundingVolume=this._defaultBoundingVolume,this._registrationMatrix3D&&(t._registrationMatrix3D=this._registrationMatrix3D.clone()),t.mouseChildren=this._mouseChildren,t.material=this._material,t.style=this._style,t.pickObject=this._pickObject,t.pickObjectFromTimeline=this.pickObjectFromTimeline,t.boundsVisible=this._boundsVisible,t.name=this._pName,t.mouseEnabled=this._mouseEnabled,t.extra=this.extra,t.maskMode=this._maskMode,t.castsShadows=this.castsShadows,t.assetNamespace=this.assetNamespace,t._symbol=this._symbol,t.avm1Symbol=this.avm1Symbol,t.isAVMScene=this.isAVMScene,t.isSlice9ScaledMC=this.isSlice9ScaledMC,t.scale9Grid=null===(e=this.scale9Grid)||void 0===e?void 0:e.clone(),this._timelineMasks&&(t._timelineMasks=this._timelineMasks.slice()),t._mask=this._mask,this._transform.copyRawDataTo(t._transform)},s.prototype.dispose=function(){this.disposeValues()},s.prototype.disposeValues=function(){this._parent&&this._parent.removeChild(this),this.material=null,this._adapter&&(this._adapter.dispose(),this._adapter=null),this._pickObject=null,delete this._timelineMasks,delete this._mask},s.prototype.lookAt=function(t,e){void 0===e&&(e=null),this.transform.lookAt(t,e)},s.prototype.movePivot=function(t,i,s){0==t&&0==i&&0==s||(this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[12]-=t/this._transform.scale.x,this._registrationMatrix3D._rawData[13]-=i/this._transform.scale.y,this._registrationMatrix3D._rawData[14]-=s/this._transform.scale.z,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},s.prototype.reset=function(){this.visible=!0,this.noTimelineUpdate||this._transform.clearMatrix3D(),this._transform.clearColorTransform(),this.mask=void 0,this.timelineMasks=void 0,this.maskMode=!1},s.prototype.isOnDisplayList=function(){for(var t=this;t;){if(t.isAVMScene)return!0;t=t.parent}return!1},s.prototype._setParent=function(t){this._parent=t},s.prototype._invalidateHierarchicalProperty=function(t){for(var e in this._containerNodes)this._containerNodes[e].invalidateHierarchicalProperty(t)},Object.defineProperty(s.prototype,"maskId",{get:function(){return this._maskId},enumerable:!1,configurable:!0}),s.prototype._setScaleX=function(t){this.scaleX!=t&&(this._transform.scale.x=t,this._transform.invalidateMatrix3D())},s.prototype._setScaleY=function(t){this.scaleY!=t&&(this._transform.scale.y=t,this._transform.invalidateMatrix3D())},s.prototype._setScaleZ=function(t){this.scaleZ!=t&&(this._transform.scale.z=t,this._transform.invalidateMatrix3D())},s.prototype._updateBoundsPrefab=function(t){if(this._boundsPrefab instanceof d){var i=t.getBoundingVolume(null,this._defaultBoundingVolume).getBox();if(null==i)return;this._boundsPrefab.width=i.width,this._boundsPrefab.height=i.height,this._boundsPrefab.depth=i.depth,this._boundsPrimitive.registrationPoint=new e.Vector3D(-(i.x+i.width/2)*this._boundsPrimitive.transform.scale.x,-(i.y+i.height/2)*this._boundsPrimitive.transform.scale.y,-(i.z+i.depth/2)*this._boundsPrimitive.transform.scale.z)}else if(this._boundsPrefab instanceof _){var r=t.getBoundingVolume(null,this._defaultBoundingVolume).getSphere();if(null==r)return;this._boundsPrefab.radius=r.radius,this._boundsPrimitive.registrationPoint=new e.Vector3D(-r.x*this._boundsPrimitive.transform.scale.x,-r.y*this._boundsPrimitive.transform.scale.y,-r.z*this._boundsPrimitive.transform.scale.z)}},s.prototype._updateMaskMode=function(){this._maskMode&&(this._mouseEnabled=!1),this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASK_ID)},s.prototype._invalidateMaterial=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateMaterial()},s.prototype._invalidateStyle=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateStyle()},s.prototype.invalidateElements=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateElements()},s.prototype._onInvalidateProperties=function(t){this._invalidateStyle()},s.prototype._onInvalidateImages=function(t){this.invalidate()},s.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.BOX_BOUNDS_FAST},s}(e.AssetBase),m=function(t){function i(){var e=t.call(this)||this;return e._children=[],e.doingSwap=!1,e.tabChildren=!1,e}return l(i,t),Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"animator",{get:function(){return this._animator},set:function(t){this._animator&&this._animator.removeOwner(this),this._animator=t,this._animator&&this._animator.addOwner(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!1,configurable:!0}),i.prototype.advanceFrame=function(){for(var t=0;t<this._children.length;t++)this._children[t].advanceFrame()},i.prototype.addChild=function(t){return this.addChildAt(t,this._children.length)},i.prototype.addChildAt=function(t,e){for(var i in t.parent&&t.parent.removeChild(t),this._children.splice(e,0,t),t._setParent(this),this._containerNodes)this._containerNodes[i].addChildAt(t,e);return t},i.prototype.addChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t.length,r=0;r<i;r++)this.addChild(t[r])},i.prototype.clone=function(){var t=new i;return this.copyTo(t),t},i.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),this._animator&&(e.animator=this._animator.clone());for(var i=this._children.length,r=0;r<i;++r){var s=this._children[r].adapter.clone().adaptee;e.addChild(s)}},i.prototype.contains=function(t){return this._children.indexOf(t)>=0},i.prototype.disposeValues=function(){this._animator&&this._animator.dispose();for(var e=this._children.length-1;e>=0;e--)this.removeChild(this._children[e]);t.prototype.disposeValues.call(this)},i.prototype.getChildAt=function(t){var i=this._children[t];if(null==i)throw new e.RangeError("Index does not exist in the child list of the caller");return i},i.prototype.getChildByName=function(t){for(var e=this._children.length,i=0;i<e;++i)if(this._children[i].name==t)return this._children[i];return null},i.prototype.getChildIndex=function(t){var e=this._children.indexOf(t);if(-1==e)throw i.NO_CHILD_ERROR;return e},i.prototype.getObjectsUnderPoint=function(t){return new Array},i.prototype.removeChild=function(t){if(null==t)throw new e.ArgumentError("Parameter child cannot be null");return this.removeChildAt(this.getChildIndex(t)),t},i.prototype.removeChildAt=function(t){return this.removeChildAtInternal(t)},i.prototype.removeChildren=function(t,i){if(void 0===t&&(t=0),void 0===i&&(i=2147483647),t<0)throw new e.RangeError("beginIndex is out of range of the child list");if(i>this._children.length)throw new e.RangeError("endIndex is out of range of the child list");for(var r=i-1;r>=t;r--)this.removeChildAtInternal(r)},i.prototype.setChildIndex=function(t,i){var r=this.getChildIndex(t);if(r<0)throw new e.ArgumentError("Parameter child must be child of this object");if(i>this._children.length-1)throw new e.RangeError("Parameter index is out of range of the child list");r!=i&&(this.removeChildAt(r),this.addChildAt(t,i),t._sessionID>=0&&this._sessionID_childs&&(delete this._sessionID_childs[t._sessionID],t._sessionID=-1))},i.prototype.swapChildren=function(t,e){t.parent==this&&e.parent==this&&this.swapChildrenAt(this.getChildIndex(t),this.getChildIndex(e))},i.prototype.swapChildrenAt=function(t,e){if(t!=e){if(t>=this._children.length||e>=this._children.length)throw"[scene/DisplayobjectContainer] - swapChildrenAt - Range Error";var i,r;t<e?(r=this.removeChildAt(e),i=this.removeChildAt(t),this.addChildAt(r,t),this.addChildAt(i,e)):(i=this.removeChildAt(t),r=this.removeChildAt(e),this.addChildAt(i,e),this.addChildAt(r,t)),this._sessionID_childs&&(this._children[t]._sessionID>=0&&(delete this._sessionID_childs[this._children[t]._sessionID],this._children[t]._sessionID,this._children[t]._avmDepthID),this._children[e]._sessionID>=0&&(delete this._sessionID_childs[this._children[e]._sessionID],this._children[e]._sessionID,this._children[t]._avmDepthID))}},i.prototype._initNode=function(t){for(var e=0;e<this._children.length;++e)t.addChildAt(this._children[e],e)},i.prototype.removeChildAtInternal=function(t){var e=this._children.splice(t,1)[0];for(var i in e.adapter&&e.adapter.dispatchStaticEvent&&e.adapter.dispatchStaticEvent("removed",e.adapter),this.isOnDisplayList()&&e.adapter.dispatch_REMOVED_FROM_STAGE&&e.adapter.dispatch_REMOVED_FROM_STAGE(e),e._setParent(null),this._containerNodes)this._containerNodes[i].removeChildAt(t);return e},i.prototype._updateMaskMode=function(){this.maskMode&&(this.mouseChildren=!1),t.prototype._updateMaskMode.call(this)},i.assetType="[asset DisplayObjectContainer]",i.NO_CHILD_ERROR=new e.ArgumentError("Child parameter is not a child of the caller"),i}(g),y=function(t){function e(e,i){void 0===e&&(e=null),void 0===i&&(i=null);var r=t.call(this)||this;return r.graphics=e,r.material=i,r}return l(e,t),e.getNewSprite=function(t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),e._sprites.length){var r=e._sprites.pop();return r.graphics=t,r.material=i,r}return new e(t,i)},e.clearPool=function(){e._sprites=[]},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){return this._graphics||(this.graphics=s.Graphics.getGraphics()),this._graphics},set:function(t){this._graphics!=t&&(this._graphics&&this._graphics.removeOwner(this),this._graphics=t,this._graphics&&this._graphics.addOwner(this),this.invalidate(),this._adapter&&this.adapter.updateGraphics())},enumerable:!1,configurable:!0}),e.prototype.getEntity=function(){return t.prototype.getEntity.call(this),this._iSourcePrefab&&this._iSourcePrefab._iValidate(),this._graphics},e.prototype.dispose=function(){this.disposeValues(),e._sprites.push(this)},e.prototype.disposeValues=function(){t.prototype.disposeValues.call(this)},e.prototype.clone=function(){var t=e.getNewSprite();return this.copyTo(t),t},e.prototype.copyTo=function(e,i){void 0===i&&(i=!1),t.prototype.copyTo.call(this,e),e._iSourcePrefab=this._iSourcePrefab,this._graphics&&this._graphics.copyTo(e.graphics,i)},e.prototype.bakeTransformations=function(){this._graphics.applyTransformation(this.transform.matrix3D),this.transform.clearMatrix3D()},e._sprites=[],e.assetType="[asset Sprite]",e}(m),b=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._frameCaches={},e}return l(i,t),i.getNewMorphSprite=function(t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),i._morphSprites.length){var r=i._morphSprites.pop();return r.graphics=t||s.Graphics.getGraphics(),r.material=e,r}return new i(t,e)},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.prototype.reset=function(){t.prototype.reset.call(this),this.setRatio(0)},i.prototype._blendStyle=function(t,i,r,n){var o,a,l,h=1-n,c=n,u=t.style.fillStyle,p=i.style.fillStyle;if(t.style.data_type!=i.style.data_type)throw"Error in morph data - different styles of pathes";switch(u.data_type){case s.SolidFillStyle.data_type:var d=p;a=h*(w=u).alpha+c*d.alpha,o=e.ColorUtils.interpolateFloat32Color(w.color,d.color,n),l=new s.SolidFillStyle(o,a);break;case s.GradientFillStyle.data_type:for(var _=[],f=[],g=[],m=(d=p,(w=u).colors.length),y=0;y<m;y++)_[_.length]=e.ColorUtils.interpolateFloat32Color(w.colors[y],d.colors[y],n),g[g.length]=h*w.alphas[y]+c*d.alphas[y],f[f.length]=h*w.ratios[y]+c*d.ratios[y];var b=w.matrix,v=d.matrix;(x=new e.Matrix).a=b.a*h+v.a*c,x.b=b.b*h+v.b*c,x.c=b.c*h+v.c*c,x.d=b.d*h+v.d*c,x.tx=b.tx*h+v.tx*c,x.ty=b.ty*h+v.ty*c,l=new s.GradientFillStyle(w.type,_,g,f,x,w.spreadMethod,w.interpolationMethod,w.focalPointRatio);break;case s.BitmapFillStyle.data_type:var x;d=p,b=(w=u).matrix,v=d.matrix;(x=new e.Matrix).a=b.a*h+v.a*c,x.b=b.b*h+v.b*c,x.c=b.c*h+v.c*c,x.d=b.d*h+v.d*c,x.tx=b.tx*h+v.tx*c,x.ty=b.ty*h+v.ty*c,l=new s.BitmapFillStyle(w.image,x,w.repeat,w.smooth)}if(t.style.data_type===s.GraphicsStrokeStyle.data_type){var w=t.style,E=(d=i.style,h*w.thickness+c*d.thickness);r.style=new s.GraphicsStrokeStyle(l,E,w.jointstyle,w.capstyle,w.miterLimit,w.scaleMode)}else r.style=new s.GraphicsFillStyle(l)},i.prototype._blendContours=function(t,e,i,r){var n=1-r,o=r,a=t.commands.length;if(e.commands.length!==a)throw"Error in morph data - different number of contour";for(var l=0,h=0,c=0,u=0,p=0,d=0,_=t.data,f=e.data,g=0;g<a;g++){var m=t.commands[g],y=e.commands[g];switch(m){case s.GraphicsPathCommand.MOVE_TO:if(y!=s.GraphicsPathCommand.MOVE_TO)throw"Error in morph data - both shapes must start with Move too command";c=_[l++],u=_[l++],p=f[h++],d=f[h++],i.moveTo(n*c+o*p,n*u+o*d);break;case s.GraphicsPathCommand.LINE_TO:if(y==s.GraphicsPathCommand.LINE_TO)c=_[l++],u=_[l++],p=f[h++],d=f[h++],i.lineTo(n*c+o*p,n*u+o*d);else if(y==s.GraphicsPathCommand.CURVE_TO){var b=c+(_[l++]-c)/2,v=u+(_[l++]-u)/2;i.curveTo(n*b+o*f[h++],n*v+o*f[h++],n*_[l-2]+o*f[h++],n*_[l-1]+o*f[h++]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1]}break;case s.GraphicsPathCommand.CURVE_TO:if(y==s.GraphicsPathCommand.LINE_TO){b=p+(f[h++]-p)/2,v=d+(f[h++]-d)/2;i.curveTo(n*_[l++]+o*b,n*_[l++]+o*v,n*_[l++]+o*f[h-2],n*_[l++]+o*f[h-1]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1]}else y==s.GraphicsPathCommand.CURVE_TO&&(i.curveTo(n*_[l++]+o*f[h++],n*_[l++]+o*f[h++],n*_[l++]+o*f[h++],n*_[l++]+o*f[h++]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1])}}},i.prototype.setRatio=function(t){var e=65535*t|0,i=this._graphics;if(this._ratio!==e){if(this._ratio=e,i.buildQueueTags?i.buildQueueTags(!0):(i.endFill(),i.clear()),i.start.length!==i.end.length)throw"Error in morph data - different number of pathes";for(var r=i.start.length,n=0;n<r;n++){var o=new s.GraphicsPath,a=i.start[n],l=i.end[n];this._blendStyle(a,l,o,t),this._blendContours(a,l,o,t),i.add_queued_path(o,!0)}i._endFillInternal(!0)}},i.prototype.dispose=function(){this.disposeValues(),this._frameCaches={},i._morphSprites.push(this)},i.prototype.clone=function(){var t=i.getNewMorphSprite();return this.copyTo(t),t},i.assetType="[asset MorphSprite]",i._morphSprites=new Array,i}(y),v=["",i.BlendMode.NORMAL,i.BlendMode.LAYER,i.BlendMode.MULTIPLY,i.BlendMode.SCREEN,i.BlendMode.LIGHTEN,i.BlendMode.DARKEN,i.BlendMode.DIFFERENCE,i.BlendMode.ADD,i.BlendMode.SUBTRACT,i.BlendMode.INVERT,i.BlendMode.ALPHA,i.BlendMode.ERASE,i.BlendMode.OVERLAY,i.BlendMode.HARDLIGHT];var x=function(){function t(t){this.factory=t,this._update_indices=[],this._update_frames=[],this.isButton=!1,this._initalMcID=-1,this.numKeyFrames=0,this.keyframe_indices=[],this.avm1Exports={},this.avm1InitActions={},this.avm1ButtonActions=[],this.graphicsPool={},this.audioPool={},this.placeObjectTagsForSessionIDs={},this._labels={},this._framescripts={},this._framescripts_translated={},this.keyframe_to_frameidx={}}return t.prototype.resetScripts=function(){this._framescripts={},this._framescripts_translated={}},t.prototype.init=function(){if(null!=this.frame_command_indices&&null!=this.frame_recipe&&null!=this.keyframe_durations){var t=0,e=0,i=0,r=0,s=0,n=0;this.keyframe_firstframes=[],this.keyframe_constructframes=[],this.keyframe_indices=[],this.keyframe_to_frameidx={},this.keyframe_to_frameidx[0]=0;var o=0;for(e=0;e<this.numKeyFrames;e++)for(this.keyframe_to_frameidx[e]=o,o+=r=this.keyframe_durations[e],1&this.frame_recipe[e]&&(n=s),this.keyframe_firstframes[s]=t,this.keyframe_constructframes[s++]=n,i=0;i<r;i++)this.keyframe_indices[t++]=e}},t.prototype.add_framescript=function(t,e,i,r){if(void 0===r&&(r=!1),!(this._initalMcID>=0&&i.id!=this._initalMcID)){if(this._initalMcID=i.id,this._framescripts[e]||(this._framescripts[e]=[]),Array.isArray(t))for(var s=0;s<t.length;s++)this._framescripts[e][this._framescripts[e].length]=t[s];else this._framescripts[e].push(t);this._framescripts_translated[e]=!r}},t.prototype.get_script_for_frame=function(t,e,i){if(void 0===i&&(i=!1),e>=0&&this._framescripts[e]){if(i&&!this._framescripts_translated[e]){var r=t.className?t.className:t.name;this._framescripts[e]=this.factory.createFrameScripts(this._framescripts[e],e,r,t.id),this._framescripts_translated[e]=!0}return this._framescripts[e]}return null},Object.defineProperty(t.prototype,"numFrames",{get:function(){return this.keyframe_indices.length},enumerable:!1,configurable:!0}),t.prototype.getKeyframeIndexForFrameIndex=function(t){return this.keyframe_indices[t]},t.prototype.getChildInstance=function(t,e){return this.factory.createChildInstanceForTimeline(this,t,e)},t.prototype.extractHitArea=function(t){t.reset(!1),this.gotoFrame(t,this.numFrames-1,!1);for(var e,i,r=t.numChildren,s=new m;r>0;)r--,(e=(i=t.getChildAt(r)).clone()).x=i.x,e.scaleX=i.scaleX,e.y=i.y,e.scaleY=i.scaleY,e.rotationZ=i.rotationZ,s.addChild(e);return s.pickObjectFromTimeline=!0,t.pickObject=s,t.reset(!1),s},t.prototype.getCurrentFrameLabel=function(t){var e=this.keyframe_to_frameidx[t.constructedKeyFrameIndex];for(var i in this._labels)if(this._labels[i].keyFrameIndex==t.constructedKeyFrameIndex&&e==t.currentFrameIndex)return this._labels[i].name;return null},t.prototype.getCurrentLabel=function(t){var e=null,i=-1;for(var r in this._labels){var s=this._labels[r].keyFrameIndex;s>i&&s<=t.constructedKeyFrameIndex&&(i=s,e=this._labels[r].name)}return e},t.prototype.jumpToLabel=function(t,e,i){if(void 0===i&&(i=0),this._labels[e]){var r=this._labels[e].keyFrameIndex;r>=0&&(t.currentFrameIndex=this.keyframe_firstframes[r]+i)}else console.warn("[TIMELINE] - jumpToLabel with invalid label",t,e,i)},t.prototype.getScriptForLabel=function(t,e,i){void 0===i&&(i=!1);var r=this._labels[e.toLowerCase()].keyFrameIndex;if(r<0)return null;var s=this.keyframe_firstframes[r];return s>=0&&this._framescripts[s]?this.get_script_for_frame(t,s,i):null},t.prototype.gotoFrame=function(t,e,i,r,s){void 0===i&&(i=!0),void 0===r&&(r=!1),void 0===s&&(s=!1);var n=t.constructedKeyFrameIndex,o=this.keyframe_indices[e];if(n!=o||s)if(n+1!=o){var a=this.keyframe_constructframes[o],l=a,h=o>n;h&&n>a&&(l=n+1),t.adapter.constructFrame(this,l,o,h,e,r,i),this.applyCollectedUpdateCommands(t),t.constructedKeyFrameIndex=o}else this.constructNextFrame(t,i,!0);else t.adapter.queueFrameScripts(this,e,i)},t.prototype.applyCollectedUpdateCommands=function(t){var e,i=this._update_indices.length;for(e=0;e<i;e++)this.update_childs(t,this._update_indices[e],this._update_frames[e])},t.prototype.constructNextFrame=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var r=t.currentFrameIndex,s=this.keyframe_indices[r];if(e&&t.adapter.queueFrameScripts(this,r,i),t.constructedKeyFrameIndex!=s){t.constructedKeyFrameIndex=s;var n=this.frame_command_indices[s],o=this.frame_recipe[s];1&o?t.adapter.removeAllTimelineChilds():2&o&&this.remove_childs_continous(t,n++),4&o&&this.add_childs_continous(t,n++),8&o&&this.update_childs(t,n++),16&o&&this.start_sounds(t,n++)}},t.prototype.remove_childs_continous=function(t,e){for(var i=this.command_index_stream[e],r=i+this.command_length_stream[e],s=i;s<r;s++)t.adapter.removeTimelineChildAt(this.remove_child_stream[s])},t.prototype.add_childs_continous=function(t,e){for(var i,r=this.command_index_stream[e],s=r+this.command_length_stream[e],n=r;n<s;n++)if(i=3*n,void 0!==this.add_child_stream[i]){var o=this.factory.createChildInstanceForTimeline(this,this.add_child_stream[i+2],this.add_child_stream[i]);t.adapter.addTimelineChildAtDepth(o,this.add_child_stream[i+1])}else console.warn("[Timeline] - add_childs_continous - could not find child-id in child_stream for idx",i,this.add_child_stream)},t.prototype.start_sounds=function(t,e){for(var i=this.command_index_stream[e],r=i+this.command_length_stream[e],s=i;s<r;s++){var n=this.audioPool[this.add_sounds_stream[s]];if(n){var o=n.sound;if(!o)return void console.warn("[Timeline] Missing sound in audioProps!",n);15==n.cmd?t.startSound(o,n.props.loopCount||0):16==n.cmd&&t.stopSound(o)}}},t.prototype.update_childs=function(e,i,r){for(var s=this.command_index_stream[i],n=s+this.command_length_stream[i],o=s;o<n;o++){var a=e.getTimelineChildAtSessionID(this.update_child_stream[o]);if(a){this._blocked=!(!a._adapter||!a.adapter.isBlockedByScript());for(var l=this.update_child_props_indices_stream[o],h=l+this.update_child_props_length_stream[o],c=l;c<h;c++)t.applyFunctionMap[this.property_type_stream[c]](this,a,e,this.property_index_stream[c])}}},t.update_mtx_all=function(t,e,i,r){if(!t._blocked&&!e.noTimelineUpdate){r*=6;var s=e.transform.matrix3D,n=t.properties_stream_f32_mtx_all;s._rawData[0]=n[r++],s._rawData[1]=n[r++],s._rawData[4]=n[r++],s._rawData[5]=n[r++],s._rawData[12]=n[r++],s._rawData[13]=n[r],e.transform.invalidateComponents()}},t.update_colortransform=function(t,i,r,s){if(!i._adapter||!i.adapter.isColorTransformByScript()){s*=8;var n=t.properties_stream_f32_ct,o=i.transform.colorTransform||(i.transform.colorTransform=new e.ColorTransform);o._rawData[0]=n[s++],o._rawData[1]=n[s++],o._rawData[2]=n[s++],o._rawData[3]=n[s++],o._rawData[4]=n[s++],o._rawData[5]=n[s++],o._rawData[6]=n[s++],o._rawData[7]=n[s],i.transform.invalidateColorTransform()}},t.update_masks=function(t,e,i,r){var s=[],n=t.properties_stream_int[r++];if(0!==n){for(var o=0;o<n;o++)s.push(i.getTimelineChildAtSessionID(t.properties_stream_int[r+o]));e.timelineMasks=s}else e.timelineMasks=void 0},t.update_name=function(t,e,i,r){0!=t.properties_stream_strings[r].indexOf("instance")&&(i.adapter.unregisterScriptObject(e),e.name=t.properties_stream_strings[r],i.adapter.registerScriptObject(e))},t.update_button_name=function(t,e,i,r){e.name=t.properties_stream_strings[r],e.addButtonListeners(),i.adapter.registerScriptObject(e)},t.update_visibility=function(t,e,i,r){e._adapter&&e.adapter.isVisibilityByScript()||(e.visible=!!r)},t.update_mtx_scale_rot=function(t,e,i,s){if(!t._blocked&&!e.noTimelineUpdate){s*=4;var n=e.transform.matrix3D,o=t.properties_stream_f32_mtx_scale_rot;n._rawData[0]=o[s++],n._rawData[1]=o[s++],n._rawData[4]=o[s++],n._rawData[5]=o[s],e.transform.invalidateComponents(),e._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)}},t.update_mtx_pos=function(t,e,i,r){if(!t._blocked&&!e.noTimelineUpdate){r*=2;var s=e.transform.matrix3D;s._rawData[12]=t.properties_stream_f32_mtx_pos[r++],s._rawData[13]=t.properties_stream_f32_mtx_pos[r],e.transform.invalidatePosition()}},t.enable_maskmode=function(t,e,i,r){e.maskMode=!0},t.remove_masks=function(t,e,i,r){e.timelineMasks=void 0},t.update_filters=function(t,e,i,r){var s=t.properties_stream_int[r++],n=t.properties_stream_int[r++],o=e.adapter;0!==n?o.updateFilters(t.properties_stream_filters.slice(s,s+n)):o.updateFilters(null)},t.swap_graphics=function(t,e,i,r){if(e.isAsset(y)){var s=e,n=t.graphicsPool[t.properties_stream_int[r]];n.id!==s.graphics.id&&(s.graphics=n)}else console.warn("[Timeline] - swap_graphics - child is not a Sprite")},t.start_audio=function(t,e,i,r){},t.set_ratio=function(t,e,i,r){e.isAsset(b)?e.setRatio(t.properties_stream_int[r]/65535):console.warn("[Timeline] - set_ratio - child is not a MorphSprite")},t.update_blendmode=function(t,e,i,r){var s;e.blendMode=(void 0===(s=r)&&(s=1),v[s]||v[1])},t.update_rendermode=function(t,e,i,r){console.log("update rendermode "+r)},t.prototype.dispose=function(){this.keyframe_indices=[],this.avm1Exports={},this.avm1InitActions={},this.avm1ButtonActions=[],this.graphicsPool={},this.audioPool={},this.placeObjectTagsForSessionIDs={},this._labels={},this._framescripts={},this._framescripts_translated={}},t.applyFunctionMap=((c={})[1]=t.update_mtx_all,c[2]=t.update_colortransform,c[3]=t.update_masks,c[4]=t.update_name,c[5]=t.update_button_name,c[6]=t.update_visibility,c[7]=t.update_blendmode,c[8]=t.update_rendermode,c[9]=t.update_filters,c[11]=t.update_mtx_scale_rot,c[12]=t.update_mtx_pos,c[200]=t.enable_maskmode,c[201]=t.remove_masks,c[202]=t.swap_graphics,c[203]=t.set_ratio,c[204]=t.start_audio,c),t}(),w=function(){function t(t){void 0===t&&(t=null),this._pAutoUpdate=!0,this.targetObject=t}return t.prototype.pNotifyUpdate=function(){this._pTargetObject&&this._pTargetObject._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},Object.defineProperty(t.prototype,"targetObject",{get:function(){return this._pTargetObject},set:function(t){this._pTargetObject!=t&&(this._pTargetObject&&this._pAutoUpdate&&(this._pTargetObject._iController=null),this._pTargetObject=t,this._pTargetObject&&this._pAutoUpdate&&(this._pTargetObject._iController=this),this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._pAutoUpdate},set:function(t){this._pAutoUpdate!=t&&(this._pAutoUpdate=t,this._pTargetObject&&(this._pAutoUpdate?this._pTargetObject._iController=this:this._pTargetObject._iController=null))},enumerable:!1,configurable:!0}),t.prototype.update=function(t){throw new e.AbstractMethodError},t.prototype.updateController=function(){this._pControllerDirty&&this._pAutoUpdate&&(this._pControllerDirty=!1,this.pNotifyUpdate())},t}(),E=function(t){function i(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i=0),void 0===r&&(r=90),void 0===s&&(s=-90),void 0===n&&(n=90),void 0===o&&(o=8),void 0===a&&(a=!1);var l=t.call(this,e)||this;return l._iCurrentPanAngle=0,l._iCurrentTiltAngle=90,l._panAngle=0,l._tiltAngle=90,l._minTiltAngle=-90,l._maxTiltAngle=90,l._steps=8,l._walkIncrement=0,l._strafeIncrement=0,l._wrapPanAngle=!1,l.fly=!1,l.panAngle=i,l.tiltAngle=r,l.minTiltAngle=s,l.maxTiltAngle=n,l.steps=o,l.wrapPanAngle=a,l._iCurrentPanAngle=l._panAngle,l._iCurrentTiltAngle=l._tiltAngle,l}return l(i,t),Object.defineProperty(i.prototype,"steps",{get:function(){return this._steps},set:function(t){t=t<1?1:t,this._steps!=t&&(this._steps=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"panAngle",{get:function(){return this._panAngle},set:function(t){this._panAngle!=t&&(this._panAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tiltAngle",{get:function(){return this._tiltAngle},set:function(t){t=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,t)),this._tiltAngle!=t&&(this._tiltAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minTiltAngle",{get:function(){return this._minTiltAngle},set:function(t){this._minTiltAngle!=t&&(this._minTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxTiltAngle",{get:function(){return this._maxTiltAngle},set:function(t){this._maxTiltAngle!=t&&(this._maxTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapPanAngle",{get:function(){return this._wrapPanAngle},set:function(t){this._wrapPanAngle!=t&&(this._wrapPanAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){if(void 0===t&&(t=!0),this._tiltAngle!=this._iCurrentTiltAngle||this._panAngle!=this._iCurrentPanAngle){if(this._pControllerDirty=!0,this._wrapPanAngle){for(this._panAngle<0?(this._iCurrentPanAngle+=this._panAngle%360+360-this._panAngle,this._panAngle=this._panAngle%360+360):(this._iCurrentPanAngle+=this._panAngle%360-this._panAngle,this._panAngle=this._panAngle%360);this._panAngle-this._iCurrentPanAngle<-180;)this._iCurrentPanAngle-=360;for(;this._panAngle-this._iCurrentPanAngle>180;)this._iCurrentPanAngle+=360}t?(this._iCurrentTiltAngle+=(this._tiltAngle-this._iCurrentTiltAngle)/(this.steps+1),this._iCurrentPanAngle+=(this._panAngle-this._iCurrentPanAngle)/(this.steps+1)):(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle),Math.abs(this.tiltAngle-this._iCurrentTiltAngle)<.01&&Math.abs(this._panAngle-this._iCurrentPanAngle)<.01&&(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle)}this.targetObject.rotationX=this._iCurrentTiltAngle,this.targetObject.rotationY=this._iCurrentPanAngle,this._walkIncrement&&(this.fly?this.targetObject.transform.moveForward(this._walkIncrement):(this.targetObject.x+=this._walkIncrement*Math.sin(this._panAngle*e.MathConsts.DEGREES_TO_RADIANS),this.targetObject.z+=this._walkIncrement*Math.cos(this._panAngle*e.MathConsts.DEGREES_TO_RADIANS)),this._walkIncrement=0),this._strafeIncrement&&(this.targetObject.transform.moveRight(this._strafeIncrement),this._strafeIncrement=0)},i.prototype.incrementWalk=function(t){0!=t&&(this._walkIncrement+=t,this.pNotifyUpdate())},i.prototype.incrementStrafe=function(t){0!=t&&(this._strafeIncrement+=t,this.pNotifyUpdate())},i}(w),A=function(t){function i(i,r){void 0===i&&(i=null),void 0===r&&(r=null);var s=t.call(this,i)||this;return s._pOrigin=new e.Vector3D(0,0,0),r?s.lookAtObject=r:s.lookAtPosition=new e.Vector3D,s}return l(i,t),Object.defineProperty(i.prototype,"lookAtPosition",{get:function(){return this._pLookAtPosition},set:function(t){this._pLookAtObject&&(this._pLookAtObject=null),this._pLookAtPosition=t,this.pNotifyUpdate()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"lookAtObject",{get:function(){return this._pLookAtObject},set:function(t){this._pLookAtPosition&&(this._pLookAtPosition=null),this._pLookAtObject!=t&&(this._pLookAtObject=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){this._pTargetObject&&(this._pLookAtPosition?this._pTargetObject.lookAt(this._pLookAtPosition):this._pLookAtObject&&this._pTargetObject.lookAt(this._pLookAtObject.transform.matrix3D.position))},i}(w),D=function(t){function i(i,r,s,n,o,a,l,h,c,u,p,d){void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=0),void 0===n&&(n=90),void 0===o&&(o=1e3),void 0===a&&(a=-90),void 0===l&&(l=90),void 0===h&&(h=null),void 0===c&&(c=null),void 0===u&&(u=8),void 0===p&&(p=2),void 0===d&&(d=!1);var _=t.call(this,i,r)||this;return _._iCurrentPanAngle=0,_._iCurrentTiltAngle=90,_._panAngle=0,_._tiltAngle=90,_._distance=1e3,_._minPanAngle=-1/0,_._maxPanAngle=1/0,_._minTiltAngle=-90,_._maxTiltAngle=90,_._steps=8,_._yFactor=2,_._wrapPanAngle=!1,_._upAxis=new e.Vector3D,_.distance=o,_.panAngle=s,_.tiltAngle=n,_.minPanAngle=null!=h?h:-1/0,_.maxPanAngle=null!=c?c:1/0,_.minTiltAngle=a,_.maxTiltAngle=l,_.steps=u,_.yFactor=p,_.wrapPanAngle=d,_._iCurrentPanAngle=_._panAngle,_._iCurrentTiltAngle=_._tiltAngle,_}return l(i,t),Object.defineProperty(i.prototype,"steps",{get:function(){return this._steps},set:function(t){t=t<1?1:t,this._steps!=t&&(this._steps=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"panAngle",{get:function(){return this._panAngle},set:function(t){t=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,t)),this._panAngle!=t&&(this._panAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tiltAngle",{get:function(){return this._tiltAngle},set:function(t){t=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,t)),this._tiltAngle!=t&&(this._tiltAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"distance",{get:function(){return this._distance},set:function(t){this._distance!=t&&(this._distance=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minPanAngle",{get:function(){return this._minPanAngle},set:function(t){this._minPanAngle!=t&&(this._minPanAngle=t,this.panAngle=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,this._panAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxPanAngle",{get:function(){return this._maxPanAngle},set:function(t){this._maxPanAngle!=t&&(this._maxPanAngle=t,this.panAngle=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,this._panAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minTiltAngle",{get:function(){return this._minTiltAngle},set:function(t){this._minTiltAngle!=t&&(this._minTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxTiltAngle",{get:function(){return this._maxTiltAngle},set:function(t){this._maxTiltAngle!=t&&(this._maxTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"yFactor",{get:function(){return this._yFactor},set:function(t){this._yFactor!=t&&(this._yFactor=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapPanAngle",{get:function(){return this._wrapPanAngle},set:function(t){this._wrapPanAngle!=t&&(this._wrapPanAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){if(void 0===t&&(t=!0),this._tiltAngle!=this._iCurrentTiltAngle||this._panAngle!=this._iCurrentPanAngle){if(this._pControllerDirty=!0,this._wrapPanAngle){for(this._panAngle<0?(this._iCurrentPanAngle+=this._panAngle%360+360-this._panAngle,this._panAngle=this._panAngle%360+360):(this._iCurrentPanAngle+=this._panAngle%360-this._panAngle,this._panAngle=this._panAngle%360);this._panAngle-this._iCurrentPanAngle<-180;)this._iCurrentPanAngle-=360;for(;this._panAngle-this._iCurrentPanAngle>180;)this._iCurrentPanAngle+=360}t?(this._iCurrentTiltAngle+=(this._tiltAngle-this._iCurrentTiltAngle)/(this.steps+1),this._iCurrentPanAngle+=(this._panAngle-this._iCurrentPanAngle)/(this.steps+1)):(this._iCurrentPanAngle=this._panAngle,this._iCurrentTiltAngle=this._tiltAngle),Math.abs(this.tiltAngle-this._iCurrentTiltAngle)<.01&&Math.abs(this._panAngle-this._iCurrentPanAngle)<.01&&(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle)}var i=this.lookAtObject?this.lookAtObject.transform.position:this.lookAtPosition?this.lookAtPosition:this._pOrigin;this.targetObject.x=i.x+this.distance*Math.sin(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this.targetObject.y=i.y+this.distance*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS)*this.yFactor,this.targetObject.z=i.z+this.distance*Math.cos(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.x=-Math.sin(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.y=Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.z=-Math.cos(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._pTargetObject&&(this._pLookAtPosition?this._pTargetObject.lookAt(this._pLookAtPosition,this._upAxis):this._pLookAtObject&&this._pTargetObject.lookAt(this._pLookAtObject.transform.matrix3D.position,this._upAxis))},i}(A),T=function(t){function e(e,i,r,s){return void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=45),void 0===s&&(s=700),t.call(this,e,i,0,r,s)||this}return l(e,t),e.prototype.update=function(e){this.lookAtObject&&(this.panAngle=this._pLookAtObject.rotationY-180,t.prototype.update.call(this))},e}(D),S=function(t){function i(i,r,s,n,o){void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===n&&(n=40),void 0===o&&(o=4);var a=t.call(this,i,r)||this;return a.positionOffset=new e.Vector3D(0,500,-1e3),a.stiffness=s,a.damping=o,a.mass=n,a._velocity=new e.Vector3D,a._dv=new e.Vector3D,a._stretch=new e.Vector3D,a._force=new e.Vector3D,a._acceleration=new e.Vector3D,a._desiredPosition=new e.Vector3D,a}return l(i,t),i.prototype.update=function(e){if(this._pLookAtObject&&this._pTargetObject){this._pControllerDirty=!0;var i=this._pLookAtObject.transform.matrix3D.deltaTransformVector(this.positionOffset);this._desiredPosition.x=this._pLookAtObject.x+i.x,this._desiredPosition.y=this._pLookAtObject.y+i.y,this._desiredPosition.z=this._pLookAtObject.z+i.z,this._stretch=this._pTargetObject.transform.position.add(this._desiredPosition),this._stretch.scaleBy(-this.stiffness),this._dv.copyFrom(this._velocity),this._dv.scaleBy(this.damping),this._force.x=this._stretch.x-this._dv.x,this._force.y=this._stretch.y-this._dv.y,this._force.z=this._stretch.z-this._dv.z,this._acceleration.copyFrom(this._force),this._acceleration.scaleBy(1/this.mass),this._velocity.incrementBy(this._acceleration);var r=this._pTargetObject.transform.position.add(this._velocity);this._pTargetObject.transform.moveTo(r.x,r.y,r.z),t.prototype.update.call(this)}},i}(A),C=function(t){function r(e,r,s){void 0===s&&(s=!1);var o=t.call(this)||this;return o._pickObjects={},o.preserveDimensions=!1,o._onInvalidateTextureDelegate=function(t){return o._onInvalidateTexture(t)},o.style=new n.Style,o.style.sampler=new i.ImageSampler(!1,s,!1),o.material=e,o._updateDimensions(),o}return l(r,t),r.getNewBillboard=function(t,e,i){if(void 0===e&&(e="auto"),void 0===i&&(i=!1),r._billboards.length){var s=r._billboards.pop();return s.material=t,s}return new r(t,e,i)},Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardRect",{get:function(){return this._billboardRect},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardHeight",{get:function(){return this._billboardHeight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardWidth",{get:function(){return this._billboardWidth},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"material",{get:function(){return this._material},set:function(t){t!=this._material&&(this._material&&this._material.removeEventListener(n.MaterialEvent.INVALIDATE_TEXTURES,this._onInvalidateTextureDelegate),this._material=t,this._material&&this._material.addEventListener(n.MaterialEvent.INVALIDATE_TEXTURES,this._onInvalidateTextureDelegate),this._updateDimensions(),this._invalidateMaterial())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this._width},set:function(t){this._width!=t&&(this._width=t,this.scaleX=this._width/this._billboardRect.width)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},set:function(t){this._height!=t&&(this._height=t,this.scaleY=this._height/this._billboardRect.height)},enumerable:!1,configurable:!0}),r.prototype.invalidateElements=function(){for(var e in this._pickObjects)this._pickObjects[e]._onInvalidateElements();t.prototype.invalidateElements.call(this)},r.prototype.advanceFrame=function(){},r.prototype.getEntity=function(){return this},r.prototype.dispose=function(){this.disposeValues(),r._billboards.push(this)},r.prototype.clone=function(){var t=r.getNewBillboard(this._material);return this.copyTo(t),t},r.prototype._acceptTraverser=function(t){if(this.material&&this.material.getTextureAt(0)){var e=this.image;e&&!e.isDisposed&&t.applyTraversable(this)}},Object.defineProperty(r.prototype,"image",{get:function(){var t,e;if(!this.material)return null;var i=this.material.getTextureAt(0);if(!i)return null;var r=null===(t=this._style)||void 0===t?void 0:t.getImageAt(i);return r||((r=null===(e=this.material.style)||void 0===e?void 0:e.getImageAt(i))||i.getImageAt(0))},enumerable:!1,configurable:!0}),r.prototype._updateDimensions=function(){var t=this.image;if(t&&!t.isDisposed){var i=this.style.sampler;i.imageRect?(this._billboardWidth=i.imageRect.width*t.width,this._billboardHeight=i.imageRect.height*t.height):(this._billboardWidth=t.rect.width,this._billboardHeight=t.rect.height),this._billboardRect=i.frameRect||new e.Rectangle(0,0,this._billboardWidth,this._billboardHeight)}else this._billboardWidth=1,this._billboardHeight=1,this._billboardRect=new e.Rectangle(0,0,1,1);this.invalidate(),this.invalidateElements(),this.preserveDimensions?(this.scaleX=this._width/this._billboardRect.width,this.scaleY=this._height/this._billboardRect.height):(this._width=this._billboardRect.width*this.scaleX,this._height=this._billboardRect.height*this.scaleY)},r.prototype._onInvalidateProperties=function(e){void 0===e&&(e=null),t.prototype._onInvalidateProperties.call(this,e),this._updateDimensions()},r.prototype._onInvalidateTexture=function(t){this._updateDimensions()},r._billboards=new Array,r.assetType="[asset Billboard]",r}(m),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=this.renderable,r=t.billboardWidth,s=t.billboardHeight,o=t.billboardRect,a=r.toString()+s.toString()+o.toString();this._id=a;var l=e._samplerElements[a];if(!l){var h=-o.x,c=-o.y,u=r-o.x,p=s-o.y;(l=e._samplerElements[a]=new n.TriangleElements(new i.AttributesBuffer(11,4))).autoDeriveNormals=!1,l.autoDeriveTangents=!1,l.setPositions([h,c,0,u,p,0,u,c,0,h,c,0,h,p,0,u,p,0]),l.setUVs([0,0,1,1,1,0,0,0,0,1,1,1])}return this._stage.abstractions.getAbstraction(l)},e.prototype.draw=function(){this._stage.context.setCulling(i.ContextGLTriangleFace.NONE),t.prototype.draw.call(this)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable.material||n.MaterialUtils.getDefaultColorMaterial())},e.prototype._getStyle=function(){return this.renderable.style},e._samplerElements=new Object,e}(n._Render_RenderableBase),I=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.hitTestPoint=function(t,e,i){return!0},i.prototype.getBoxBounds=function(t,i,r,s){if(void 0===t&&(t=null),void 0===r&&(r=null),void 0===s&&(s=null),this._orientedBoxBoundsDirty){this._orientedBoxBoundsDirty=!1;var n=this.pickable.billboardRect;this._orientedBoxBounds=new e.Box(n.x,n.y,0,n.width,n.height,0)}return(t?t.transformBox(this._orientedBoxBounds):this._orientedBoxBounds).union(s,s||r)},i.prototype.getSphereBounds=function(t,e,i,r,s){return void 0===s&&(s=null),s},i.prototype.testCollision=function(t,i){var r=-t.rayPosition.z/t.rayDirection.z,s=new e.Vector3D(t.rayPosition.x+r*t.rayDirection.x,t.rayPosition.y+r*t.rayDirection.y);return t.pickable=this.pickable,t.rayEntryDistance=r,t.position=s,t.normal=new e.Vector3D(0,0,1),!0},i}(r._Pick_PickableBase);n.RenderEntity.registerRenderable(P,C),r.PickEntity.registerPickable(I,C);var O=function(t){function e(e,i){var r=t.call(this,e)||this;return r._camera=i,r}return l(e,t),Object.defineProperty(e.prototype,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._camera)},e.PROJECTION_CHANGED="projectionChanged",e}(e.EventBase),N=function(t){function i(i){void 0===i&&(i=null);var r=t.call(this)||this;return r._projection=i||new e.PerspectiveProjection,r._projection.transform=r._transform,r.z=-1e3,r}return l(i,t),Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"projection",{get:function(){return this._projection},set:function(t){if(this._projection!=t){if(!t)throw new Error("Projection cannot be null!");this._projection.transform=null,this._projection=t,this._projection.transform=this._transform,this.dispatchEvent(new O(O.PROJECTION_CHANGED,this))}},enumerable:!1,configurable:!0}),i.prototype.project=function(t,e){return void 0===e&&(e=null),this._projection.project(this._transform.inverseMatrix3D.transformVector(t,e),e)},i.prototype.unproject=function(t,e,i,r){return void 0===r&&(r=null),this._transform.matrix3D.transformVector(this._projection.unproject(t,e,i,r))},i.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.NULL},i.assetType="[asset Camera]",i}(m),L=function(t){function e(e,i,r,s){void 0===s&&(s=1);var n=t.call(this)||this;return n._pickObjects={},n.material=e,n._startPosition=i,n._endPosition=r,n._halfThickness=.5*s,n}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPosition",{get:function(){return this._startPosition},set:function(t){this._startPosition!=t&&(this._startPosition=t,this.invalidateElements())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){return this._endPosition},set:function(t){this._endPosition!=t&&(this._endPosition=t,this.invalidateElements())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return 2*this._halfThickness},set:function(t){this._halfThickness!=t&&(this._halfThickness=.5*t,this.invalidateElements())},enumerable:!1,configurable:!0}),e.prototype.invalidateElements=function(){for(var e in this._pickObjects)this._pickObjects[e]._onInvalidateElements();t.prototype.invalidateElements.call(this)},e.prototype.getEntity=function(){return this},e.prototype._acceptTraverser=function(t){t.applyTraversable(this)},e.assetType="[asset LineSegment]",e}(g),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=this.renderable,i=e._lineGraphics[t.id]||(e._lineGraphics[t.id]=new n.LineElements),r=t.startPosition,s=t.endPosition,o=new Float32Array(6),a=new Float32Array(1);return o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=s.x,o[4]=s.y,o[5]=s.z,a[0]=t.thickness,i.setPositions(o),i.setThickness(a),this._stage.abstractions.getAbstraction(i)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable.material||n.MaterialUtils.getDefaultColorMaterial())},e.prototype._getStyle=function(){return this.renderable.style},e._lineGraphics={},e}(n._Render_RenderableBase),F=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.hitTestPoint=function(t,e,i){return!0},i.prototype.getBoxBounds=function(t,i,r,s){if(void 0===t&&(t=null),void 0===r&&(r=null),void 0===s&&(s=null),this._orientedBoxBoundsDirty){this._orientedBoxBoundsDirty=!1;var n=this.pickable,o=n.startPosition,a=n.endPosition;this._orientedBoxBounds=new e.Box(Math.min(o.x,a.x),Math.min(o.y,a.y),Math.min(o.z,a.z),Math.abs(o.x-a.x),Math.abs(o.y-a.y),Math.abs(o.z-a.z))}return(t?t.transformBox(this._orientedBoxBounds):this._orientedBoxBounds).union(s,s||r)},i.prototype.getSphereBounds=function(t,i,r,s,n){if(void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=null),this._orientedSphereBoundsDirty){this._orientedSphereBoundsDirty=!1;var o=this.pickable,a=o.startPosition,l=o.endPosition,h=(l.x-a.x)/2,c=(l.y-a.y)/2,u=(l.z-a.z)/2;this._orientedSphereBounds=new e.Sphere(a.x+h,a.y+c,a.z+u,Math.sqrt(h*h+c*c+u*u))}return(i?i.transformSphere(this._orientedSphereBounds):this._orientedSphereBounds).union(n,n||s)},i.prototype.testCollision=function(t,e){return t.pickable=null,!1},i}(r._Pick_PickableBase);n.RenderEntity.registerRenderable(M,L),r.PickEntity.registerPickable(F,L);var k=function(t){function i(i,r){var s;void 0===i&&(i=!0),void 0===r&&(r=null);var n=t.call(this)||this;return n._useAssetLib=i,n._assetLibId=r,n._onLoaderStartDelegate=function(t){return n._onLoaderStart(t)},n._onLoadProgressDelegate=function(t){return n._onLoadProgress(t)},n._onLoadCompleteDelegate=function(t){return n._onLoadComplete(t)},n._onAssetCompleteDelegate=function(t){return n._onAssetComplete(t)},n._onLoaderCompleteDelegate=function(t){return n._onLoaderComplete(t)},n._onLoadErrorDelegate=function(t){return n._onLoadError(t)},n._onParseErrorDelegate=function(t){return n._onParseError(t)},n._errorDelegateSelector=((s={})[e.URLLoaderEvent.LOAD_ERROR]=n._onLoadErrorDelegate,s[e.ParserEvent.PARSE_ERROR]=n._onParseErrorDelegate,s),n}return l(i,t),Object.defineProperty(i.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"contentLoader",{get:function(){return this._contentLoader},enumerable:!1,configurable:!0}),i.prototype.addEventListener=function(i,r){(this._contentLoader&&i==e.URLLoaderEvent.LOAD_ERROR||i==e.ParserEvent.PARSE_ERROR)&&this._contentLoader.addEventListener(i,this._errorDelegateSelector[i]),t.prototype.addEventListener.call(this,i,r)},i.prototype.removeEventListener=function(i,r){(this._contentLoader&&i==e.URLLoaderEvent.LOAD_ERROR||i==e.ParserEvent.PARSE_ERROR)&&this._contentLoader.removeEventListener(i,this._errorDelegateSelector[i]),t.prototype.removeEventListener.call(this,i,r)},i.prototype.close=function(){this._contentLoader&&(this._useAssetLib&&e.AssetLibraryBundle.getInstance(this._assetLibId).stopLoader(this._contentLoader),this._disposeLoader())},i.prototype.load=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this._getLoader().load(t,e,i,r)},i.prototype.loadData=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this._getLoader().loadData(t,"",e,i,r)},i.prototype._getLoader=function(){return this._contentLoader&&this.close(),this._contentLoader=this._useAssetLib?e.AssetLibraryBundle.getInstance(this._assetLibId).getLoader():new e.Loader,this._contentLoader.addEventListener(e.LoaderEvent.LOADER_START,this._onLoaderStartDelegate),this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_PROGRESS,this._onLoadProgressDelegate),this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_COMPLETE,this._onLoadCompleteDelegate),this._contentLoader.addEventListener(e.AssetEvent.ASSET_COMPLETE,this._onAssetCompleteDelegate),this._contentLoader.addEventListener(e.LoaderEvent.LOADER_COMPLETE,this._onLoaderCompleteDelegate),this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_ERROR,this._onLoadErrorDelegate),this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&this._contentLoader.addEventListener(e.ParserEvent.PARSE_ERROR,this._onParseErrorDelegate),this._contentLoader},i.prototype._disposeLoader=function(){this._contentLoader.removeEventListener(e.LoaderEvent.LOADER_START,this._onLoaderStartDelegate),this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_PROGRESS,this._onLoadProgressDelegate),this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_COMPLETE,this._onLoadCompleteDelegate),this._contentLoader.removeEventListener(e.AssetEvent.ASSET_COMPLETE,this._onAssetCompleteDelegate),this._contentLoader.removeEventListener(e.LoaderEvent.LOADER_COMPLETE,this._onLoaderCompleteDelegate),this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_ERROR,this._onLoadErrorDelegate),this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&this._contentLoader.removeEventListener(e.ParserEvent.PARSE_ERROR,this._onParseErrorDelegate),this._useAssetLib||this._contentLoader.stop(),this._contentLoader=null},i.prototype.unload=function(){},i.enableParser=function(t){e.Loader.enableParser(t)},i.enableParsers=function(t){e.Loader.enableParsers(t)},i.prototype._onLoaderStart=function(t){this.dispatchEvent(t)},i.prototype._onLoadProgress=function(t){this.dispatchEvent(t)},i.prototype._onLoadComplete=function(t){this.dispatchEvent(t)},i.prototype._onAssetComplete=function(t){this.dispatchEvent(t)},i.prototype._onLoadError=function(t){return!!this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&(this.dispatchEvent(t),!0)},i.prototype._onParseError=function(t){return!!this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&(this.dispatchEvent(t),!0)},i.prototype._onLoaderComplete=function(t){this._content=t.content,this._content&&this.addChild(this._content),this.dispatchEvent(t),this._disposeLoader()},i}(m),R=function(){function t(){}return t.setInterval=function(t,e,i){return void 0===i&&(i=!1),this._intervalID++,e<1&&(e=1),this._active_intervals.push({id:this._intervalID,f:t,t:e,dt:0,isTimeout:i,isActive:!0}),this._intervalID},t.setTimeOut=function(t,e){return this.setInterval(t,e,!0)},t.clearInterval=function(t){for(var e=this._active_intervals.length;e--;)if(this._active_intervals[e].id==t){this._active_intervals[e].isActive=!1,this._active_intervals.splice(e,1),this._index>e&&this._index--;break}},t.clearTimeout=function(t){this.clearInterval(t)},t.execute_intervals=function(t){var e;for(void 0===t&&(t=0),this._index=this._active_intervals.length;this._index--;)for((e=this._active_intervals[this._index]).dt+=t;e.isActive&&e.dt>=e.t;)e.isTimeout&&(e.isActive=!1,this._active_intervals.splice(this._index,1)),e.dt-=e.t,e.f()},t.add_child_to_dispose=function(t){this._queued_dispose.push(t)},t.get_queue=function(){return t._queue||(t._queue={queued_mcs:[],queued_scripts:[],queued_mcs_pass2:[],queued_scripts_pass2:[],constructors:[]}),t._queue},t.add_script_to_queue=function(e,i){var r=t.get_queue(),s=r.queued_mcs_pass2.length,n=0;for(n=0;n<s;n++)r.queued_mcs.push(r.queued_mcs_pass2[n]),r.queued_scripts.push(r.queued_scripts_pass2[n]);r.queued_mcs_pass2.length=0,r.queued_scripts_pass2.length=0,e.adapter.allowScript=!0,r.queued_mcs.push(e),r.queued_scripts.push(i)},t.add_loaded_action_to_queue=function(e){var i=t.get_queue();i.queued_mcs.push(e),i.queued_scripts.push(null)},t.add_script_to_queue_pass2=function(e,i){var r=t.get_queue();e.adapter.allowScript=!0,r.queued_mcs_pass2.push(e),r.queued_scripts_pass2.push(i)},t.execute_as3_constructors_finish_scene=function(e){for(var i=0,r=e.numChildren;i<r;i++){var s=e.getChildAt(i);s.parent&&s.adapter.executeConstructor&&t.execute_as3_constructors_recursiv(s)}},t.execute_as3_constructors_enterFrame=function(e){t.invalidAS3Constructors&&(t.execute_as3_constructors_recursiv(e),t.invalidAS3Constructors=!1)},t.execute_as3_constructors_recursiv=function(e){var i=e.adapter,r=i.executeConstructor;if(r)i.executeConstructor=null,r();else for(var s=0,n=e.numChildren;s<n;s++){var o=e.getChildAt(s);t.execute_as3_constructors_recursiv(o)}e.just_added_to_timeline&&e._sessionID>=0&&i&&i.dispatchStaticEvent&&(e.just_added_to_timeline=!1,i.dispatchStaticEvent("added",i),e.hasDispatchedAddedToStage=e.isOnDisplayList(),e.hasDispatchedAddedToStage&&i.dispatchStaticEvent("addedToStage",i))},t.isOnStage=function(t){for(var e=t;e&&!e.isAVMScene;)e=e.parent;return!(!e||!e.isAVMScene)},t.execute_avm1_constructors=function(){var e=t.get_queue();if(0!=e.queued_mcs.length||0!=e.queued_mcs_pass2.length){for(var i=e.queued_mcs_pass2.length;i>0;)i--,e.queued_mcs.push(e.queued_mcs_pass2[i]),e.queued_scripts.push(e.queued_scripts_pass2[i]);e.queued_mcs_pass2.length=0,e.queued_scripts_pass2.length=0;var r,s=e.queued_mcs;if(t.useAVM1){for(i=s.length;i>0;)if(r=s[--i],t.isOnStage(r)&&r.onInitialize){var n=r.onInitialize;r.onInitialize=null,n()}for(i=0;i<s.length;i++)if(r=s[i],t.isOnStage(r)){if(r.onConstruct){n=r.onConstruct;r.onConstruct=null,n()}var o=r.adapter.executeConstructor;o&&(r.adapter.executeConstructor=null,o())}}}},t.execute_queue=function(){var e=t.get_queue();if(0!=e.queued_mcs.length||0!=e.queued_mcs_pass2.length){var i=e.queued_mcs.concat(),r=e.queued_scripts.concat();e.queued_mcs.length=0,e.queued_scripts.length=0;var s,n=e.queued_mcs_pass2.length,o=0;for(o=0;o<n;o++)i.push(e.queued_mcs_pass2[o]),r.push(e.queued_scripts_pass2[o]);if(e.queued_mcs_pass2.length=0,e.queued_scripts_pass2.length=0,t.useAVM1){for(o=0;o<i.length;o++)if(s=i[o],t.isOnStage(s)&&s.onInitialize){var a=s.onInitialize;s.onInitialize=null,a()}for(o=0;o<i.length;o++)if(s=i[o],t.isOnStage(s)){if(s.onConstruct){a=s.onConstruct;s.onConstruct=null,a()}var l=s.adapter.executeConstructor;l&&(s.adapter.executeConstructor=null,l())}}for(o=0;o<i.length;o++){if(s=i[o],t.useAVM1){if(!t.isOnStage(s))continue;if(s.onLoaded){a=s.onLoaded;s.onLoaded=null,a()}if(!s.adapter.hasOnLoadExecuted){s.adapter.hasOnLoadExecuted=!0;var h=s.adapter.alGet("onLoad");h&&h.alCall(s.adapter)}}null!=r[o]&&((s=i[o])&&s.adapter&&!s.adapter.constructorHasRun?(e.queued_mcs.push(s),e.queued_scripts.push(r[o])):s&&s.adapter&&s.adapter.executeScript&&s.adapter.executeScript(r[o]))}}},t.execute_dispose=function(){for(var t=this._queued_dispose.length,e=0;e<t;e++)this._queued_dispose[e].dispose();this._queued_dispose.length=0},t.invalidAS3Constructors=!1,t.frameScriptDebug=void 0,t.useAVM1=!1,t._queued_dispose=[],t._active_intervals=[],t._index=0,t._intervalID=0,t}(),B=function(t){function e(e){return t.call(this,e)||this}return l(e,t),Object.defineProperty(e.prototype,"bubbles",{get:function(){var t=this._iAllowedToPropagate&&this._iAllowedToImmediatlyPropagate;return this._iAllowedToPropagate=!0,this._iAllowedToImmediatlyPropagate=!0,t},enumerable:!1,configurable:!0}),e.prototype.stopPropagation=function(){this._iAllowedToPropagate=!1,this._iParentEvent&&this._iParentEvent.stopPropagation()},e.prototype.stopImmediatePropagation=function(){this._iAllowedToPropagate=!1,this._iAllowedToImmediatlyPropagate=!1,this._iParentEvent&&this._iParentEvent.stopImmediatePropagation()},Object.defineProperty(e.prototype,"scenePosition",{get:function(){return this.containerNode.getMatrix3D().transformVector(this.position)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sceneNormal",{get:function(){var t=this.containerNode.getMatrix3D().deltaTransformVector(this.normal);return t.normalize(),t},enumerable:!1,configurable:!0}),e.prototype._dispatchEvent=function(t,e){},e}(e.EventBase),q=function(t){function e(e){var i=t.call(this,e)||this;return i.buttons=0,i}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.screenX=this.screenX,t.screenY=this.screenY,t.view=this.view,t.containerNode=this.containerNode,t.rootNode=this.rootNode,t.pickable=this.pickable,t.material=this.material,t.uv=this.uv,t.position=this.position,t.normal=this.normal,t.elementIndex=this.elementIndex,t.delta=this.delta,t.ctrlKey=this.ctrlKey,t.shiftKey=this.shiftKey,t._iParentEvent=this,t._iAllowedToPropagate=this._iAllowedToPropagate,t.buttons=this.buttons,t},e.prototype._dispatchEvent=function(t,i){t.isMouseDisabled()&&this.type!=e.MOUSE_OUT&&this.type!=e.ROLL_OUT||(t.container.dispatchEvent(this,i),R.execute_queue())},e.MOUSE_OVER="mouseOver3d",e.MOUSE_OUT="mouseOut3d",e.ROLL_OVER="rollOver3d",e.ROLL_OUT="rollOut3d",e.MOUSE_UP="mouseUp3d",e.MOUSE_UP_OUTSIDE="mouseUpOutside3d",e.MOUSE_DOWN="mouseDown3d",e.MOUSE_MOVE="mouseMove3d",e.DRAG_MOVE="dragMove3d",e.DRAG_OUT="dragOut3d",e.DRAG_OVER="dragOver3d",e.DRAG_START="dragStart3d",e.DRAG_STOP="dragStop3d",e.CLICK="click3d",e.DOUBLE_CLICK="doubleClick3d",e.MOUSE_WHEEL="mouseWheel3d",e}(B),U=function(t){function i(e,i){void 0===i&&(i=!1);var r=t.call(this)||this;return r.symbolID=0,r.preventScript=!1,r._scenes=[],r._buttonMode=!1,r._isButton=!1,r._time=0,r._currentFrameIndex=-1,r._isPlaying=!0,r._currentSceneIndex=0,r._sceneDirty=!1,r._isInit=!0,r._sessionID_childs={},r._sounds={},r._skipFramesForStream=0,r._isTimelinePass=!1,r._isSprite=!1,r.buttonEnabled=!0,r.loop=!0,r.constructedKeyFrameIndex=-1,r._soundVolume=1,r._isButton=!1,r._buttonMode=!1,r._useHandCursor=!0,r.doingSwap=!1,r.cursorType="pointer",r._onMouseOver=function(t){r.buttonEnabled?r.currentFrameIndex=1&t.buttons?0==r.currentFrameIndex?0:2:1:r.currentFrameIndex=0},r._onMouseOut=function(t){r.currentFrameIndex=1&t.buttons&&0!=r.currentFrameIndex?1:0},r._onMouseDown=function(t){r.buttonEnabled?r.currentFrameIndex=2:r.currentFrameIndex=0},r._onMouseUp=function(t){r.currentFrameIndex=1},r._onMouseUpOutside=function(t){r.currentFrameIndex=0},r._timeline=e,i&&r.transformToSprite(),r._onChannelCompleteStopError=r._onChannelCompleteStopError.bind(r),r}return l(i,t),i.stopSounds=function(t){if(t)i._activeSounds[t.id]&&i._activeSounds[t.id].stop();else for(var e in i._activeSounds)i._activeSounds[e].stop()},i.getNewMovieClip=function(t){if(i._movieClips.length){var e=i._movieClips.pop();return e.timeline=t,e}return new i(t)},i.clearPool=function(){i._movieClips=[]},Object.defineProperty(i.prototype,"isSprite",{get:function(){return this._isSprite},enumerable:!1,configurable:!0}),i.prototype.initSoundStream=function(t,e){this._soundStreams||(this._soundStreams=new i.movieClipSoundsManagerClass(this)),this._soundStreams.initSoundStream(t,e)},i.prototype.addSoundStreamBlock=function(t,e){this._soundStreams||(this._soundStreams=new i.movieClipSoundsManagerClass(this)),this._soundStreams.addSoundStreamBlock(t,e)},i.prototype.stopCurrentStream=function(t){if(this._soundStreams)return this._soundStreams.stopStream(t)},i.prototype.resetStreamStopped=function(){this._soundStreams&&this._soundStreams.resetStreamStopped()},i.prototype._syncSounds=function(t){return this._soundStreams?this._soundStreams.syncSounds(t,this._isPlaying,this.parent):0},i.prototype.transformToSprite=function(){if(!this._isSprite){this._isSprite=!0;var t=this._timeline;t.numFrames<=1||(t.frame_command_indices=[t.frame_command_indices[0]],t.frame_recipe=[t.frame_recipe[0]],t.keyframe_constructframes=[t.keyframe_constructframes[0]],t.keyframe_durations=[t.keyframe_durations[0]],t.keyframe_firstframes=[t.keyframe_firstframes[0]],t.keyframe_indices=[t.keyframe_indices[0]])}},i.prototype.startSound=function(t,r,s){var n=t.play(0,r);n.volume=this._soundVolume,s&&n.addEventListener(e.BaseAudioChannel.COMPLETE,s),n.addEventListener(e.BaseAudioChannel.COMPLETE,this._onChannelCompleteStopError),n.addEventListener(e.BaseAudioChannel.STOP,this._onChannelCompleteStopError),n.addEventListener(e.BaseAudioChannel.ERROR,this._onChannelCompleteStopError);var o=t.id;this._sounds[o]||(this._sounds[o]=[]),this._sounds[o].push(n),i._activeSounds[o]=t},i.prototype.stopSounds=function(t){if(void 0===t&&(t=null),t)this._sounds[t.id]&&this._stopChannels(t);else for(var e in this._sounds)for(var r=0,s=this._sounds[e];r<s.length;r++){s[r].stop()}for(var n,o=this._children.length,a=0;a<o;++a)(n=this._children[a]).isAsset(i)&&n.stopSounds(t);this.stopCurrentStream(this._currentFrameIndex),this._soundStreams&&this._soundStreams.syncSounds(0,!1,this.parent)},i.prototype.getSceneIndexByFrame=function(t){var e=this.scenes;if(e.length<=1)return 0;for(var i=0;i<e.length;i++)if(e[i].offset>t)return i-1;return e.length-1},i.prototype.getSceneIndex=function(t){for(var e=this.scenes,i=0;i<e.length&&t;i++)if(e[i].name===t)return i;return 0},Object.defineProperty(i.prototype,"currentSceneName",{get:function(){return this.scenes[this._currentSceneIndex].name},set:function(t){var e=this.getSceneIndex(t);this._sceneDirty=this._currentSceneIndex!==e,this._currentSceneIndex=e,this._currentFrameIndex=this._scenes[e].offset},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentScene",{get:function(){var t=this.scenes[this._currentSceneIndex];return-1===t.numFrames&&(t.numFrames=this.timeline.numFrames-t.offset),t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"scenes",{get:function(){return 0===this._scenes.length&&(this._scenes[0]={name:"Scene1",offset:0,labels:[],numFrames:this.timeline.numFrames}),this._scenes},set:function(t){this._scenes=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"soundVolume",{get:function(){return this._soundVolume},set:function(t){var e;if(this._soundVolume!=t)for(var i in this._soundVolume=t,this._sounds)if(e=this._sounds[i])for(var r=0,s=e;r<s.length;r++){s[r].volume=t}},enumerable:!1,configurable:!0}),i.prototype.stopSound=function(t){i.stopSounds(t)},i.prototype.buttonReset=function(){this._isButton&&!this.buttonEnabled&&(this.currentFrameIndex=0)},i.prototype.getMouseCursor=function(){return"scene"==this.name?"initial":this._useHandCursor&&this.buttonMode?this.cursorType:"initial"},i.prototype.queueFrameScripts=function(t,e,i){console.warn("[MovieClip] - queueFrameScripts should only be called on AVM-Adapters")},i.prototype.registerScriptObject=function(t){this[t.name]=t,t.isAsset(i)&&t.removeButtonListeners()},i.prototype.unregisterScriptObject=function(t){delete this[t.name],t.isAsset(i)&&t.removeButtonListeners()},i.prototype.dispose=function(){this.disposeValues(),i._movieClips.push(this)},i.prototype.disposeValues=function(){t.prototype.disposeValues.call(this),this._sessionID_childs={},this._timeline=null},Object.defineProperty(i.prototype,"useHandCursor",{get:function(){return this._useHandCursor},set:function(t){this._useHandCursor=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buttonMode",{get:function(){return this._buttonMode},set:function(t){this._buttonMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isButton",{get:function(){return this._isButton},set:function(t){this._isButton=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isInit",{get:function(){return this._isInit},set:function(t){this._isInit=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"timeline",{get:function(){return this._timeline},set:function(t){this._timeline!=t&&(this._timeline=t,this.reset(!1,!1))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"numFrames",{get:function(){return this._timeline.numFrames},enumerable:!1,configurable:!0}),i.prototype.jumpToLabel=function(t,e){void 0===e&&(e=0);var i=this._currentFrameIndex;return this._timeline.jumpToLabel(this,t,e),i!==this._currentFrameIndex},i.prototype.reset=function(e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this._isTimelinePass=!0,i&&t.prototype.reset.call(this),this.resetStreamStopped(),this._time=0,i&&this._adapter&&this.adapter.freeFromScript(),this.constructedKeyFrameIndex=-1;for(var r=this.numChildren-1;r>=0;r--)this.removeChildAt(r);if(this._graphics&&this._graphics.clear(),e){var s=this._timeline.keyframe_indices.length;this._isPlaying=Boolean(s>1),this._currentSceneIndex=0,s?(this._currentFrameIndex=0,this._timeline.constructNextFrame(this,e&&!this.doingSwap&&!this.preventScript,!0)):this._currentFrameIndex=-1}this._skipAdvance=!0,this._isTimelinePass=!1},Object.defineProperty(i.prototype,"currentFrameIndex",{get:function(){return this._currentFrameIndex},set:function(t){this.jumpToIndex(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentFrameIndexRelative",{get:function(){return this._currentFrameIndex-this.currentScene.offset},set:function(t){this.jumpToIndex(t,this._currentSceneIndex)},enumerable:!1,configurable:!0}),i.prototype.jumpToIndex=function(t,e){var i=!0,r=0,s=this._timeline.keyframe_indices.length;if(this.resetStreamStopped(),!s)return!1;var n=this.scenes;if(void 0===e)e=this.getSceneIndexByFrame(t);else{var o=n[e="string"==typeof e?this.getSceneIndex(e):e];-1===o.numFrames&&(o.numFrames=s-o.offset),r=o.offset,s=o.numFrames}return this._currentSceneIndex=e,t<0?t=0:t>=s&&(t=s-1,i=!1),t+=r,this._skipAdvance=!1,!(this._currentFrameIndex===t&&!this._sceneDirty)&&(this._sceneDirty=!1,this._currentFrameIndex=t,this._isTimelinePass=!0,this._timeline.gotoFrame(this,t,i,!1,!1),this._isTimelinePass=!1,!0)},i.prototype.addButtonListeners=function(){this._isButton=!0,this.stop(),this.addEventListener(q.MOUSE_OVER,this._onMouseOver),this.addEventListener(q.MOUSE_OUT,this._onMouseOut),this.addEventListener(q.MOUSE_DOWN,this._onMouseDown),this.addEventListener(q.MOUSE_UP,this._onMouseUp),this.addEventListener(q.MOUSE_UP_OUTSIDE,this._onMouseUpOutside),this.mouseChildren=!1},i.prototype.removeButtonListeners=function(){this.removeEventListener(q.MOUSE_OVER,this._onMouseOver),this.removeEventListener(q.MOUSE_OUT,this._onMouseOut),this.removeEventListener(q.MOUSE_DOWN,this._onMouseDown),this.removeEventListener(q.MOUSE_UP,this._onMouseUp),this.removeEventListener(q.MOUSE_UP_OUTSIDE,this._onMouseUpOutside)},i.prototype.getTimelineChildAtSessionID=function(t){return this._sessionID_childs[t]},i.prototype.constructFrame=function(t,e,i,r,s,n,o){console.warn("[scene/MovieClip] - constructFrame not implemented")},i.prototype.addTimelineChildAtDepth=function(t,e,i){return console.warn("[scene/MovieClip] - addTimelineChildAtDepth not implemented"),null},i.prototype.removeTimelineChildAtDepth=function(t){console.warn("[scene/MovieClip] - removeTimelineChildAtDepth not implemented")},i.prototype.removeChildAtInternal=function(e){var i=this._children[e];return i._adapter&&i.adapter.freeFromScript(),this._isTimelinePass&&this.adapter.unregisterScriptObject(i),delete this._sessionID_childs[i._sessionID],i._sessionID=-1,t.prototype.removeChildAtInternal.call(this,e)},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.prototype.play=function(){this._timeline.keyframe_indices.length>1&&(this._isPlaying=!0)},i.prototype.stop=function(){this.resetStreamStopped(),this._isPlaying=!1},i.prototype.clone=function(){var t=i.getNewMovieClip(this._timeline);return this.copyTo(t),t},i.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.buttonMode=this.buttonMode,e.symbolID=this.symbolID,e.loop=this.loop,e._soundStreams=this._soundStreams,e._scenes=this._scenes,this._isSprite&&e.transformToSprite()},i.prototype.advanceFrameInternal=function(){this._timeline&&this._timeline.numFrames>0&&this._isPlaying&&!this._skipAdvance&&(this._currentFrameIndex===this._timeline.numFrames-1?this.loop?0!==this._currentFrameIndex&&(this._currentFrameIndex=0,this._currentSceneIndex=0,this.resetStreamStopped(),this._timeline.gotoFrame(this,0,!0,!0,!0)):this._isPlaying=!1:(this._currentFrameIndex++,this._currentSceneIndex=this.getSceneIndexByFrame(this._currentFrameIndex),this._timeline.constructNextFrame(this))),t.prototype.advanceFrame.call(this),this._skipAdvance=!1},i.prototype.advanceFrame=function(){for(this._isTimelinePass=!0,0==this._skipFramesForStream&&this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex);this._skipFramesForStream>0;)R.execute_queue(),this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex);this._isTimelinePass=!1},i.prototype.logHierarchy=function(t){void 0===t&&(t=0),this.printHierarchyName(t,this);for(var e,r=this._children.length,s=0;s<r;s++)(e=this._children[s]).isAsset(i)?e.logHierarchy(t+1):this.printHierarchyName(t+1,e)},i.prototype.printHierarchyName=function(t,e){for(var i="",r=0;r<t;++r)i+="--";i+=" "+e.name+" = "+e.id,console.log(i)},i.prototype.clear=function(){this.resetStreamStopped(),t.prototype.clear.call(this)},i.prototype._onChannelCompleteStopError=function(t){var i=t.target,r=i.owner,s=this._sounds[r.id],n=s?s.indexOf(i):-1;i.removeEventListener(e.BaseAudioChannel.COMPLETE,this._onChannelCompleteStopError),i.removeEventListener(e.BaseAudioChannel.STOP,this._onChannelCompleteStopError),i.removeEventListener(e.BaseAudioChannel.ERROR,this._onChannelCompleteStopError),-1!=n&&(s.splice(n,1),0===s.length&&this._removeSound(r))},i.prototype._stopChannels=function(t){for(var e=t.id,i=0,r=this._sounds[e];i<r.length;i++){r[i].stop()}},i.prototype._removeSound=function(t){delete this._sounds[t.id],t.isPlaying||delete i._activeSounds[t.id]},i.movieClipSoundsManagerClass=null,i._movieClips=[],i._activeSounds={},i.assetType="[asset MovieClip]",i}(y),V=function(t){function e(e,i,r,s){return t.call(this)||this}return l(e,t),Object.defineProperty(e.prototype,"downState",{get:function(){return this._downState},set:function(t){this._downState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this.enabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hitTestState",{get:function(){return this._hitTestState},set:function(t){this._hitTestState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overState",{get:function(){return this._overState},set:function(t){this._overState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"soundTransform",{get:function(){return console.log("soundTransform not implemented yet in flash/SimpleButton"),null},set:function(t){console.log("soundTransform not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackAsMenu",{get:function(){return console.log("trackAsMenu not implemented yet in flash/SimpleButton"),!1},set:function(t){console.log("trackAsMenu not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"upState",{get:function(){return this._upState},set:function(t){this._upState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useHandCursor",{get:function(){return console.log("useHandCursor not implemented yet in flash/SimpleButton"),!1},set:function(t){console.log("useHandCursor not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),e}(y),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.assetType="[asset SkyboxElements]",e}(n.TriangleElements),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._includeDependencies=function(t){},e.prototype._getVertexCode=function(t,e,i){var r="",s=t.globalPosDependencies>0?i.globalPositionVertex:i.animatedPosition,n=e.getFreeVertexConstant();e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.viewMatrixIndex=4*n.index;var o=e.getFreeVertexConstant();t.scenePositionIndex=4*o.index;var a=e.getFreeVertexConstant(),l=e.getFreeVertexVectorTemp();return r+="mul "+l+", "+s+", "+a+"\nadd "+l+", "+l+", "+o+"\n",t.projectionDependencies>0?(i.projectionFragment=e.getFreeVarying(),r+="m44 "+l+", "+l+", "+n+"\nmov "+i.projectionFragment+", "+l+"\nmov op, "+l+"\n"):r+="m44 op, "+l+", "+n+"\n",r},e.prototype._getFragmentCode=function(t,e,i){return""},e}(n._Render_ElementsBase),G=function(t){function r(){var i=null!==t&&t.apply(this,arguments)||this;return i._skyboxProjection=new e.Matrix3D,i}return l(r,t),r.prototype.draw=function(t,r,s,n){var o=r.scenePositionIndex,a=r.view.projection.transform.matrix3D.position;r.vertexConstantData[o++]=2*a.x,r.vertexConstantData[o++]=2*a.y,r.vertexConstantData[o++]=2*a.z,r.vertexConstantData[o++]=1,r.vertexConstantData[o++]=r.vertexConstantData[o++]=r.vertexConstantData[o++]=r.view.projection.far/Math.sqrt(3),r.vertexConstantData[o]=1;var l=new e.Vector3D;this._skyboxProjection.copyFrom(r.view.viewMatrix3D),this._skyboxProjection.copyRowTo(2,l);var h=l.x,c=l.y,u=l.z,p=-(l.x*a.x+l.y*a.y+l.z*a.z+Math.sqrt(h*h+c*c+u*u)),d=h>=0?1:-1,_=c>=0?1:-1,f=new e.Vector3D(d,_,1,1),g=this._skyboxProjection.clone();g.invert();var m=g.transformVector(f);this._skyboxProjection.copyRowTo(3,f);var y=(m.x*f.x+m.y*f.y+m.z*f.z+m.w*f.w)/(h*m.x+c*m.y+u*m.z+p*m.w);this._skyboxProjection.copyRowFrom(2,new e.Vector3D(h*y,c*y,u*y,p*y)),r.sceneMatrixIndex>=0&&r.sceneMatrix.copyFrom(t.entity.renderSceneTransform,!0),r.viewMatrix.copyFrom(this._skyboxProjection,!0);var b=this._pool.context;b.setProgramConstantsFromArray(i.ContextGLProgramType.VERTEX,r.vertexConstantData),b.setProgramConstantsFromArray(i.ContextGLProgramType.FRAGMENT,r.fragmentConstantData),this._indices?this.getIndexBufferGL().draw(i.ContextGLDrawMode.TRIANGLES,0,this.numIndices):this._pool.context.drawVertices(i.ContextGLDrawMode.TRIANGLES,n,s||this.numVertices)},r}(n._Stage_TriangleElements);n.RenderGroup.registerElements(H,j),i.Stage.registerAbstraction(G,j);var z=function(t){function s(e,r){void 0===e&&(e=16777215);var s=t.call(this)||this;return s._textures=new Array,s._blendMode=i.BlendMode.NORMAL,s.animateUVs=!1,s.bothSides=!1,s.curves=!1,s.imageRect=!1,s.useColorTransform=!1,s.alphaThreshold=0,s.alphaBlending=!0,s._onTextureInvalidateDelegate=function(t){return s.onTextureInvalidate(t)},s.style=new n.Style,e instanceof i.ImageCube?(s._style.image=e,s.texture=new n.ImageTextureCube):s._style.color=Number(e),s}return l(s,t),Object.defineProperty(s.prototype,"animationSet",{get:function(){return this._animationSet},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this._blendMode!=t&&(this._blendMode=t,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.removeTexture(this._texture),this._texture=t,this._texture&&this.addTexture(this._texture),this.invalidatePasses())},enumerable:!1,configurable:!0}),s.prototype.getNumTextures=function(){return this._textures.length},s.prototype.getTextureAt=function(t){return this._textures[t]},s.prototype.getEntity=function(){return this},Object.defineProperty(s.prototype,"assetType",{get:function(){return s.assetType},enumerable:!1,configurable:!0}),s.prototype.invalidatePasses=function(){this.dispatchEvent(new n.MaterialEvent(n.MaterialEvent.INVALIDATE_PASSES,this))},s.prototype.addTexture=function(t){this._textures.push(t),t.addEventListener(e.AssetEvent.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},s.prototype.removeTexture=function(t){this._textures.splice(this._textures.indexOf(t),1),t.removeEventListener(e.AssetEvent.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},s.prototype.onTextureInvalidate=function(t){this.invalidate()},s.prototype._onInvalidateProperties=function(t){this._invalidateMaterial(),this.invalidatePasses()},s.prototype._acceptTraverser=function(t){t.applyTraversable(this)},s.prototype.iAddOwner=function(t){},s.prototype.iRemoveOwner=function(t){},s.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.NULL},s.prototype.testCollision=function(t,e){return t.pickable=null,!1},s.assetType="[asset Skybox]",s}(m),W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(e,i){t.prototype.init.call(this,e,i),this._shader=new n.ShaderBase(i,this,this,this._stage),this._texture=this._shader.abstractions.getAbstraction(this.material.texture),this._pAddPass(this)},e.prototype.onClear=function(){t.prototype.onClear.call(this),this._texture.onClear(),this._texture=null},e.prototype._pUpdateRender=function(){t.prototype._pUpdateRender.call(this);var e=this.material;this.requiresBlending=e.blendMode!=i.BlendMode.NORMAL,this.shader.setBlendMode(e.blendMode==i.BlendMode.NORMAL&&this.requiresBlending?i.BlendMode.LAYER:e.blendMode)},e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),e.usesPositionFragment=!0},e.prototype._getFragmentCode=function(t,e){return this._texture._getFragmentCode(e.shadedTarget,t,e,e.positionVarying)},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._texture._setRenderState(e)},e.prototype._activate=function(){t.prototype._activate.call(this),this._stage.context.setDepthTest(!1,i.ContextGLCompareMode.LESS),this._texture.activate()},e}(n._Render_MaterialPassBase),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=e._elements;return t||((t=new j(new i.AttributesBuffer(11,4))).autoDeriveNormals=!1,t.autoDeriveTangents=!1,t.setIndices(Array(0,1,2,2,3,0,6,5,4,4,7,6,2,6,7,7,3,2,4,5,1,1,0,4,4,0,3,3,7,4,2,1,5,5,6,2)),t.setPositions(Array(-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1))),this._stage.abstractions.getAbstraction(t)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable)},e.prototype._getStyle=function(){return this.renderable.style},e}(n._Render_RenderableBase);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t),e.prototype.isInFrustum=function(t,e,i,r){return!this.isInvisible()},e.prototype.isCastingShadow=function(){return!1}}(r.ContainerNode),n.DefaultRenderer.registerMaterial(W,z),n.RenderEntity.registerRenderable(Y,z);var X,K=function(){function t(){}return t.CENTER="center",t.LEFT="left",t.NONE="none",t.RIGHT="right",t}(),Z=function(){function t(){}return t.DYNAMIC="dynamic",t.INPUT="input",t.STATIC="input",t}();t.FontStyleName=void 0,(X=t.FontStyleName||(t.FontStyleName={})).STANDART="standart",X.BOLD="bold",X.ITALIC="italic",X.BOLDITALIC="boldItalic";var J=function(){function t(){}return t.CENTER="center",t.JUSTIFY="justify",t.LEFT="left",t.RIGHT="right",t}(),Q=function(){function t(t,e,i){void 0===t&&(t=null),void 0===e&&(e=null),void 0===i&&(i=null),this.fill_data=t,this.stroke_data=e,this.fill_data_path=i,this.fnt_channel=0,this.lastTesselatedScale=0,this.kerningCharCodes=[],this.kerningValues=[]}return t.prototype.dispose=function(){this.stroke_data&&(this.stroke_data=null),this.fill_data&&(this.fill_data=null),this.fill_data_path&&(this.fill_data_path=null)},t}(),$=function(t){this._stage=t},tt=function(){function t(){this.left=Number.MAX_VALUE,this.right=Number.MIN_VALUE,this.top=Number.MAX_VALUE,this.bottom=Number.MIN_VALUE}return t.prototype.grown=function(t,e){t<this.left&&(this.left=t),t>this.right&&(this.right=t),e<this.top&&(this.top=e),e>this.bottom&&(this.bottom=e)},t.prototype.toRect=function(){return new e.Rectangle(this.left,this.top,this.right-this.left,this.bottom-this.top)},t}(),et=function(t){function r(e,i){void 0===i&&(i=!1);var r=t.call(this,e)||this;return r.debug=!1,r.debug=i,r}return l(r,t),r.getCanvasContext=function(t,e,i){void 0===t&&(t=100),void 0===e&&(e=100),void 0===i&&(i=!1);var r="OffscreenCanvas"in self&&!i?new self.OffscreenCanvas(t,e):document.createElement("canvas");return r.width=t,r.height=e,r.getContext("2d",{desynchronized:!0,alpha:!0})},r.freeCanvasContext=function(t){t.canvas instanceof self.OffscreenCanvas||(t.canvas.width=0,t.canvas.height=0)},r.transformChar=function(t){var e=t.fill_data_path;if(0===e.commands.length)return null;for(var i=new Path2D,r=new tt,n=e.data,o=0,a=0,l=e.commands;a<l.length;a++){switch(l[a]){case s.GraphicsPathCommand.MOVE_TO:var h=n[o++]/20,c=n[o++]/20;r.grown(h,c),i.moveTo(h,c);break;case s.GraphicsPathCommand.LINE_TO:h=n[o++]/20,c=n[o++]/20;r.grown(h,c),i.lineTo(h,c);break;case s.GraphicsPathCommand.CURVE_TO:var u=n[o++]/20,p=n[o++]/20,d=n[o++]/20,_=n[o++]/20;r.grown(u,p),r.grown(d,_),i.quadraticCurveTo(u,p,d,_)}}return{path:i,char:t,rect:r.toRect()}},r.sortPatches=function(t,e){return t.rect.height-e.rect.height},r.render=function(t,i,s,n,o){void 0===n&&(n=0),void 0===o&&(o=0);for(var a=[],l=2*o,h=1,c=0,u=t.get_font_chars();c<u.length;c++){var p=u[c];(y=r.transformChar(p))&&((l+y.rect.width)*(l+y.rect.height),a.push(y))}a.sort(r.sortPatches),n&&(t.initFontSize(n),h=s/t.get_font_em_size()),i.save(),i.clearRect(0,0,s,s),i.fillStyle="#fff";for(var d=o,_=o,f=0,g=0,m=a;g<m.length;g++){var y;(y=m[g]).path&&(d+y.rect.width+l>=s/h&&(d=o,_+=f+l,f=0),_+y.rect.height>s/h&&console.warn("[FNTGeneratorCanvas] Font image overflow, font will corrupted!"),f=Math.max(y.rect.height,f),i.setTransform(h,0,0,h,(d-y.rect.x)*h,(_-y.rect.y)*h),i.fill(y.path),y.char.fnt_rect=new e.Rectangle(y.rect.x/y.char.char_width,y.rect.y/t.get_font_em_size(),y.rect.width/y.char.char_width,y.rect.height/t.get_font_em_size()),y.char.fnt_uv=new e.Rectangle(d*h/s,_*h/s,y.rect.width*h/s,y.rect.height*h/s),y.char.fnt_channel=0,d+=y.rect.width+l)}i.restore()},r.prototype.generate=function(t,s,n,o){var a=r.getCanvasContext(s,s,this.debug),l=[];for(var h in t.font_styles){var c=t.font_styles[h];r.render(c,a,s,n,o);for(var u=a.getImageData(0,0,s,s),p=new i.BitmapImage2D(s,s,!0,0,!0,this._stage),d=u.data,_=new Uint8ClampedArray(d.length),f=0;f<d.length;f+=4)_[f]=d[f+3],_[f+1]=d[f],_[f+2]=d[f+1],_[f+3]=d[f+2];p.setPixels(new e.Rectangle(0,0,s,s),_),l.push(p),c.addFNTChannel(p)}return this.debug?this.canvas=a.canvas:r.freeCanvasContext(a),l},r}($),it=Object.create(null);function rt(t,e){void 0===e&&(e="");var i=it[t._id+e];return it[t._id+e]=!0,!i}var st=function(t){function r(e){void 0===e&&(e=null);var i=t.call(this)||this;return i._font_chars_dic={},i._current_size=0,i._size_multiply=0,i._font_chars=[],i._font_em_size=32,i._ascent=0,i._descent=0,i._usesCurves=!1,i._glyphIdxToChar={},i._fntSizeLimit=-1,i._fnt_channels=[],e?(i._opentype_font=e,i._font_em_size=72,i._ascent=e.tables.hhea.ascender/(i._opentype_font.unitsPerEm/72),i._descent=e.tables.hhea.descender/(i._opentype_font.unitsPerEm/72)-2,i._current_size=0,i._size_multiply=0,i._opentype_font.charToGlyph(String.fromCharCode(32)),i):i}return l(r,t),r.prototype.addFNTChannel=function(t){this._fnt_channels.push(t)},r.prototype.getGlyphCount=function(){return this._font_chars.length},r.prototype.generateFNTData=function(t){if(!(this._fntSizeLimit>0)){var e=new et(t,!1).generate(this.font,this._font_em_size,this._current_size,4);e&&e.length>0&&(this._fntSizeLimit=4*this._current_size)}},r.prototype.generateFNTTextures=function(t,r,o){if(console.log("generateFNTTextures"),r&&(this._fntSizeLimit=.5*r,this.initFontSize(r)),this._opentype_font)for(var a=0;a<this._opentype_font.glyphs.length;a++){var l=this._opentype_font.charToGlyph(String.fromCharCode(this._opentype_font.glyphs.glyphs[a].unicode));if(l){var h=l.getPath(),c=new s.GraphicsPath,u=0,p=h.commands.length,d=0,_=0,f=this._ascent;for(u=0;u<p;u++){var g=h.commands[u];"M"===g.type?(c.moveTo(g.x,g.y+f),d=g.x,_=g.y+f):"L"===g.type?c.lineTo(g.x,g.y+f):"Q"===g.type?c.curveTo(g.x1,g.y1+f,g.x,g.y+f):"C"===g.type?c.cubicCurveTo(g.x1,g.y1+f,g.x2,g.y2+f,g.x,g.y+f):"Z"===g.type&&c.lineTo(d,_)}var m=new Q(null,null,c);m.char_width=l.advanceWidth*(1/l.path.unitsPerEm*72),m.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(c,!0),m.fill_data?(this._font_chars.push(m),this._font_chars_dic[this._opentype_font.glyphs.glyphs[a].unicode]=m):console.log("error tesselating opentype glyph",this._opentype_font.glyphs.glyphs[a])}else console.log("no char found for",this._opentype_font.glyphs.glyphs[a])}var y,b,v,x,w=0,E=0,A=[[]],D=0,T=[],S=Number.MIN_VALUE,C=Number.MIN_VALUE,P=Number.MAX_VALUE,I=Number.MAX_VALUE,O=0,N=0,L=0;for(u=0;u<this._font_chars.length;u++){for(y=this._font_chars[u].fill_data,b=new Float32Array(y.buffer),S=Number.MIN_VALUE,C=Number.MIN_VALUE,P=Number.MAX_VALUE,I=Number.MAX_VALUE,O=0,N=0,v=0;v<y.count;v++)(O=b[2*v])<I&&(I=O),O>C&&(C=O),(N=b[2*v+1])<P&&(P=N),N>S&&(S=N);this._font_chars[u].fnt_rect=new e.Rectangle(I/this._font_chars[u].char_width,P/this._font_em_size,(C-I)/this._font_chars[u].char_width,(S-P)/this._font_em_size),L+=(C-I+t+t)*(S-P+t+t),T[T.length]={idx:u,minx:I,miny:P,width:C-I,height:S-P}}T.sort((function(t,e){return t.height>e.height?-1:1}));var M=0;x=o;var F,k=1;if(r)this.initFontSize(r),k=this._size_multiply;else{k=x/Math.sqrt(L)*1.2;for(var R=!0,B=0;R;){R=!1,w=0,E=t;for(u=0;u<T.length;u++){if(B=T[u].height*k,O=0,N=0,(w+=t)+T[u].width*k+t>=x&&(w=t,E+=M+2*t,M=0),B>M&&(M=B),E+B+2*t>=x){R=!0,k*=.995;break}w+=T[u].width*k+t}}}this._fntSizeLimit=k*this._font_em_size*.5,w=0,E=t;for(u=0;u<T.length;u++){for(y=(F=this._font_chars[T[u].idx]).fill_data,b=new Float32Array(y.buffer),I=T[u].minx,C=Number.MIN_VALUE,P=T[u].miny,S=Number.MIN_VALUE,O=0,N=0,(w+=t)+T[u].width*k+t>=x&&(w=t,E+=M+2*t,M=0),T[u].height*=k,T[u].height>M&&(M=T[u].height),E+M+2*t>=x&&(w=t,E=t,M=0,A[++D]=[]),F.fnt_channel=D,v=0;v<y.count;v++)O=(b[2*v]-I)*k+w,N=(b[2*v+1]-P)*k+E,A[D][A[D].length]=O,A[D][A[D].length]=N,O>C&&(C=O),N>S&&(S=N);F.fnt_uv=new e.Rectangle(w/x,1-E/x,(C-w)/x,(S-E)/x),w+=T[u].width*k+t}var q=[];for(u=0;u<A.length;u++){var U=new i.AttributesView(Float32Array,2);U.set(A[u]);var V=U.attributesBuffer.cloneBufferView();U.dispose();var j=new n.TriangleElements(V);j.setPositions(new i.Float2Attributes(V));var H=s.Shape.getShape(j),G=new s.SolidFillStyle(16777215,1),z=s.MaterialManager.getMaterialForColor(G);H.material=z,z.getNumTextures()&&(H.style=new n.Style,H.style.image=s.TextureAtlas.getTextureForColor(G),H.style.uvMatrix=G.getUVMatrix()),q[u]=H}return q},r.prototype.getRatio=function(t){return this._size_multiply},r.prototype.hasChar=function(t){var e=!!this._font_chars_dic[t];return!e&&this._opentype_font&&(e=!!this._opentype_font.charToGlyph(String.fromCharCode(parseInt(t)))),e},r.prototype.changeOpenTypeFont=function(t,e){void 0===e&&(e=!0),e&&this._opentype_font,this._opentype_font=t,this._ascent=t.ascender,this._descent=t.descender,this._font_em_size=t.unitsPerEm;var i=this.getChar("32");i&&(this._whitespace_width=i.char_width)},r.prototype.initFontSize=function(t){this._current_size!==t&&(this._current_size=t,this._size_multiply=t/this._font_em_size,this._size_multiply)},r.prototype.getCharVertCnt=function(t){var e=this._font_chars_dic[t];return e?e.fill_data.length:0},r.prototype.getCharWidth=function(t){var e=this._whitespace_width*this._size_multiply||r.DEFAULT_SPACE;if("32"==t)return(20*e|0)/20;if("9"==t)return 2*e*20/20;var i=this.getChar(t,!1);return i?(i.char_width*this._size_multiply*20|0)/20:"9679"==t?((i=this.createPointGlyph_9679()).char_width*this._size_multiply*20|0)/20:0},Object.defineProperty(r.prototype,"usesCurves",{get:function(){return this._usesCurves},enumerable:!1,configurable:!0}),r.prototype.getLineHeight=function(){return this._size_multiply*(this._ascent-this.descent)},r.prototype.getUnderLineHeight=function(){return this._size_multiply*(this._ascent-this.descent/2)},Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){for(var t=0;t<this._font_chars.length;t++)this._font_chars[t].dispose();this._font_chars.length=0,this._font_chars_dic=null},Object.defineProperty(r.prototype,"fntSizeLimit",{get:function(){return this._fntSizeLimit},set:function(t){this._fntSizeLimit=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ascent",{get:function(){return this._ascent},set:function(t){this._ascent=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"descent",{get:function(){return this._descent},set:function(t){this._descent=t},enumerable:!1,configurable:!0}),r.prototype.get_font_chars=function(){return this._font_chars},r.prototype.get_font_em_size=function(){return this._font_em_size},r.prototype.set_whitespace_width=function(t){this._whitespace_width=t},r.prototype.get_whitespace_width=function(){return this._whitespace_width},r.prototype.set_font_em_size=function(t){this._font_em_size=t},r.prototype.buildTextLineFromIndices=function(t,i,r,n,o,a){var l=t.getTextShapeForIdentifierAndFormat(i.color.toString(),i),h=r,c=o.length,u=[],p=0;n-=this._ascent*this._size_multiply;for(var d=0;d<c;d++){var _=o[d],f=this._glyphIdxToChar[_];if(f){null===f.fill_data&&(f.fill_data_path.commands[0]==s.GraphicsPathCommand.MOVE_TO&&0==f.fill_data_path.data[0]&&0==f.fill_data_path.data[1]&&(f.fill_data_path.data.shift(),f.fill_data_path.data.shift(),f.fill_data_path.commands.shift(),f.fill_data_path.commands[0]=s.GraphicsPathCommand.LINE_TO),f.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(f.fill_data_path,!0));var g=f.fill_data;g&&(u.push({char:f,x:r,y:n,selected:!1}),p+=g.buffer.byteLength/4),r+=a[d]}else r+=a[d]}var m=new Float32Array(p);return this._fillBuffer(m,u,!1),l.addChunk(m),new e.Point(r-h,this.getLineHeight())},r.prototype.fillTextRun=function(t,e,i,r){if(this._fntSizeLimit>=0&&this._fntSizeLimit>=e.size)return this.fillTextRunFNT(t,e,i,r);var s,n,o=this._queryShape(t,e),a=i+r,l=this._size_multiply,h=t.selectionBeginIndex,c=t.selectionEndIndex,u=0;t.selectable&&((n=e.clone()).color=16777215,s=this._queryShape(t,n),n.underline&&i+1<t.words.length&&(u=t.words.get(i).x),t.selectionEndIndex<t.selectionBeginIndex&&(h=t.selectionEndIndex,c=t.selectionBeginIndex));for(var p=0,d=0,_=[],f=[],g=[],m=i;m<a;m+=1){for(var y=t.words.get(m),b=y.x,v=y.y,x=y.start,w=x+y.len,E=x;E<w;E++){var A=t.isInFocus&&E>=h&&E<c?s:o,D=t.chars_codes[E];if(32!==D&&9!==D){var T=this.getChar(D,!0);T?(A===s?(f.push({char:T,x:b,y:v,selected:!0}),p+=T.fill_data.buffer.byteLength/4):(_.push({char:T,x:b,y:v,selected:!1}),d+=T.fill_data.buffer.byteLength/4),b+=T.char_width*l):rt(this,"miss"+t.chars_codes[E])&&console.debug("[TesselatedFontTable] Error: char not found in fontTable",t.chars_codes[E],String.fromCharCode(t.chars_codes[E]))}}var S=.25*t.internalScale.y,C=v+this.getUnderLineHeight()+S,P=v+this.getUnderLineHeight()-S;if(t.selectable&&n.underline&&i+1<t.words.length){var I=new Float32Array(12);I[0]=u,I[1]=P,I[2]=u,I[3]=C,I[4]=b,I[5]=C,I[6]=b,I[7]=C,I[8]=b,I[9]=P,I[10]=u,I[11]=P,g.push(I)}}if(d>0){d+=12*g.length;for(var O=new Float32Array(d),N=this._fillBuffer(O,_,!1),L=0,M=g;L<M.length;L++){var F=M[L];O.set(F,N),N+=F.length}o.addChunk(O)}if(p>0){O=new Float32Array(p);this._fillBuffer(O,f,!0),s.addChunk(O)}},r.prototype._cacheKey=function(t,e){void 0===t&&(t=16777215),void 0===e&&(e=-1);var i=e>=0;return"".concat(t).concat(i).concat(i?e:0)},r.prototype._queryShape=function(t,i,r){void 0===r&&(r=-1);var s=t.getTextShapeForIdentifierAndFormat(this._cacheKey(i.color,r),i);if(r>=0&&!s.fntBitmap){var n=e.ColorUtils.float32ColorToARGB(i.color);s.fntBitmap=this._fnt_channels[r],s.fntColorTransform=new e.ColorTransform(n[1]/255,n[2]/255,n[3]/255)}return s},r.prototype.fillTextRunFNT=function(t,e,i,r){var s,n=this._queryShape(t,e,0),o={},a={},l=i+r,h=this._size_multiply,c=t.selectionBeginIndex,u=t.selectionEndIndex;if(t.selectable){var p=e.clone();p.color=16777215,a[(s=this._queryShape(t,p,0)).cacheId]=s,p.underline&&i+1<t.words.length&&t.words.get(i).x,t.selectionEndIndex<t.selectionBeginIndex&&(c=t.selectionEndIndex,u=t.selectionBeginIndex)}o[n.cacheId]=n;for(var d=new Map,_=i;_<l;_+=1)for(var f=t.words.get(_),g=f.x,m=f.y,y=f.start,b=y+f.len,v=null,x=null,w=0,E=-1,A=y;A<b;A++)if(32!==t.chars_codes[A]&&9!==t.chars_codes[A]){var D=this.getChar(t.chars_codes[A],!1);if(D){var T=n,S=o;t.isInFocus&&A>=c&&A<u&&(T=s,S=a);var C=T.format,P=v?v.cacheId:"";P&&w===C.color&&D.fnt_channel===E||(P=this._cacheKey(C.color,D.fnt_channel),w=C.color,E=D.fnt_channel);var I=v&&v.cacheId!==P?S[P]:v;I||(S[(I=this._queryShape(t,C,D.fnt_channel)).cacheId]=I),v===I&&x||(x=d.get(I)||{uv:[],pos:[]},d.set(I,x),v=I),this._emitCharFNT(x,D,g,m),g+=D.char_width*h}else rt(this,"miss"+t.chars_codes[A])&&console.debug("[TesselatedFontTable] Error: char not found in fontTable",t.chars_codes[A],String.fromCharCode(t.chars_codes[A]))}for(var O=0,N=Array.from(d.keys());O<N.length;O++){var L=N[O],M=d.get(L);L.addChunk(new Float32Array(M.pos),new Float32Array(M.uv))}},r.prototype._emitCharFNT=function(t,e,i,r){var s=this._size_multiply,n=this._font_em_size*s,o=e.fnt_rect,a=e.fnt_uv,l=e.char_width*s;if(o){var h=i+l*o.x*20,c=h+l*o.width*20,u=r+n*o.y*20,p=u+n*o.height*20;t.pos.push(h,u,h,p,c,u,c,u,h,p,c,p),t.uv.push(a.x,a.y,a.x,a.bottom,a.right,a.y,a.right,a.y,a.x,a.bottom,a.right,a.bottom)}},r.prototype.createPointGlyph_9679=function(){var t=[];s.GraphicsFactoryHelper.drawElipse(this._font_em_size/2,this._font_em_size/2,this._font_em_size/8,this._font_em_size/8,t,0,360,5,!1);var e=new i.AttributesView(Float32Array,2);e.set(t);var r=e.attributesBuffer.cloneBufferView();e.dispose();var n=new Q(r,null,null);return n.char_width=this._font_em_size,this._font_chars.push(n),this._font_chars_dic[9679]=n,n},r.prototype.getCharOpenType=function(t){if(!this._opentype_font)return null;var e=this._opentype_font.charToGlyph(String.fromCharCode(parseInt(t)));if(!e)return null;var i=e.getPath(),r=new s.GraphicsPath,n=0,o=i.commands.length,a=0,l=0,h=this._ascent,c=this._opentype_font.unitsPerEm/72;for(n=0;n<o;n++){var u=i.commands[n];if("M"===u.type)r.moveTo(c*u.x,c*u.y+h),a=c*u.x,l=c*u.y+h;else if("L"===u.type)r.lineTo(c*u.x,c*u.y+h);else if("Q"===u.type)r.curveTo(c*u.x1,c*u.y1+h,c*u.x,c*u.y+h);else if("C"===u.type){var p=u.x1+(u.x2-u.x1)/2,d=u.y1+(u.y2-u.y1)/2;r.curveTo(c*u.x1,c*u.y1+h,c*p,c*d+h),r.curveTo(c*u.x2,c*u.y2+h,c*u.x,c*u.y+h)}else"Z"===u.type&&r.lineTo(a,l)}var _=new Q(null,null,r);if(_.char_width=e.advanceWidth,_.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(r,!0,null,c*f.FONT_TESSELATION_QUALITY),_.lastTesselatedScale=c,!_.fill_data)return rt(this,"tess"+t)&&console.debug("[TesselatedFontTable] Error:tesselating opentype glyph:",t.charCodeAt(0)),null;this._font_chars.push(_),this._font_chars_dic[t]=_},r.prototype.getChar=function(t,e){void 0===e&&(e=!0),t=""+t;var i=this._font_chars_dic[t];if(!e&&i)return i;if(!i)return this._opentype_font?this.getCharOpenType(t):"9679"==t?this.createPointGlyph_9679():null;var r=this._size_multiply,n=Math.max(.01,Math.round(100*r)/100);if(null===i.fill_data_path)return null;if((null!=i.fill_data||null!=i.stroke_data)&&i.lastTesselatedScale>=n)return i;var o=i.fill_data_path;return o.commands[0]==s.GraphicsPathCommand.MOVE_TO&&0==o.data[0]&&0==o.data[1]&&(o.data.shift(),o.data.shift(),o.commands.shift(),o.commands[0]=s.GraphicsPathCommand.LINE_TO),i.fill_data&&i.fill_data.clear(),i.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(i.fill_data_path,!0,null,n*f.FONT_TESSELATION_QUALITY),i.lastTesselatedScale>0&&console.debug("[TesselatedFontTable] Retesselate char from scale:",i.lastTesselatedScale,n,String.fromCharCode(+t)),i.lastTesselatedScale=n,i.fill_data?i:(rt(this,"tess"+t)&&console.debug("[TesselatedFontTable] Error:tesselating glyph:",t.charCodeAt(0)),null)},r.prototype.setChar=function(t,e,i,r,s,n,o){if(void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=!1),void 0===n&&(n=0),void 0===o&&(o=null),e=Math.floor(20*e)/20,null==i&&null==r&&null==o)throw"TesselatedFontTable: trying to create a TesselatedFontChar with no data \n\t\t\t\t(fills_data, stroke_data and fill_data_path is null)";if(this._font_chars.length>0){if(s!=this._usesCurves)throw"TesselatedFontTable: Can not set different types of graphic-glyphs\n\t\t\t\t\t(curves vs non-cuves) on the same FontTable!"}else this._usesCurves=s;var a=new Q(i,r,o);a.char_width=e,a.glyph_idx=n,a.name=t,this._glyphIdxToChar[n]=a,this._font_chars.push(a),this._font_chars_dic[t]=a},r.prototype.roundTo=function(t){var e=f.TEXT_SHAPE_ROUND_PRECISION,i=1/(e||1);return Math.floor(t*i)*e},r.prototype._fillBuffer=function(t,e,i){void 0===i&&(i=!1);for(var r=this._size_multiply,s=0,n=0,o=e;n<o.length;n++){var a=o[n];if(a.selected===i){for(var l=a.x,h=a.y,c=a.char,u=new Float32Array(c.fill_data.buffer),p=u.length,d=0;d<p;d+=2)t[s+d+0]=this.roundTo(u[d+0]*r+l),t[s+d+1]=this.roundTo(u[d+1]*r+h);s+=u.length}}return s},r.assetType="[asset TesselatedFontTable]",r.DEFAULT_SPACE=14,r}(e.AssetBase),nt=function(t,e,i,r,s,n,o,a,l,h){this.id=t,this.x=e,this.y=i,this.width=r,this.height=s,this.x_offset=n,this.y_offset=o,this.x_advance=a,this.page=l,this.channel=h},ot=function(t){function e(){var e=t.call(this)||this;return e._font_chars=[],e._materials=[],e._font_chars_dic=new Object,e._ascent=0,e._descent=0,e._current_size=0,e._size_multiply=0,e._init_size=0,e._texture_width=0,e._texture_height=0,e._adjust_size=0,e}return l(e,t),e.prototype.getGlyphCount=function(){return this._font_chars.length},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.initFontSize=function(t){this._adjust_size&&(t*=this._adjust_size),this._current_size!=t&&(this._current_size=t,this._size_multiply=t/this._init_size)},e.prototype.getCharDataCanvas=function(t){var e=this._font_chars_dic[t];return e?[e.x,e.y,e.width,e.height,e.x_offset*this._size_multiply,e.y_offset*this._size_multiply]:[]},e.prototype.getCharData=function(t){var e=this._font_chars_dic[t];if(e){var i=e.height/this._init_size*this._current_size,r=e.width/this._init_size*this._current_size;return[e.x/this._texture_width,e.y/this._texture_height,e.width/this._texture_width,e.height/this._texture_height,e.x_offset*this._size_multiply,e.y_offset*this._size_multiply,i,r]}return[]},e.prototype.getCharVertCnt=function(t){return 24},Object.defineProperty(e.prototype,"texture_width",{get:function(){return this._texture_width},set:function(t){this._texture_width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture_height",{get:function(){return this._texture_height},set:function(t){this._texture_height=t},enumerable:!1,configurable:!0}),e.prototype.hasChar=function(t){return null!=this._font_chars_dic[t]},e.prototype.getCharWidth=function(t){var e=this._font_chars_dic[t];return e?this._size_multiply*e.x_advance:0},e.prototype.fillTextRun=function(t,e,i,r){},e.prototype.getLineHeight=function(){return this._current_size},e.prototype.dispose=function(){for(var t=this._materials.length,e=0;e<t;++e)this._materials[e].dispose();this._materials.length=0,this._font_chars.length=0,this._font_chars_dic=null},e.prototype.addMaterial=function(t){this._materials.push(t)},e.prototype.getMaterial=function(t){return void 0===t&&(t=0),this._materials[t]},Object.defineProperty(e.prototype,"ascent",{get:function(){return this._ascent},set:function(t){this._ascent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"descent",{get:function(){return this._descent},set:function(t){this._descent=t},enumerable:!1,configurable:!0}),e.prototype.get_font_chars=function(){return this._font_chars},e.prototype.get_font_em_size=function(){return this._font_em_size},e.prototype.set_whitespace_width=function(t){this._whitespace_width=t},e.prototype.get_whitespace_width=function(){return this._whitespace_width},e.prototype.set_font_em_size=function(t){this._font_em_size=t},e.prototype.getChar=function(t){return this._font_chars_dic[t]},e.prototype.setChar=function(t,e,i,r,s,n,o,a,l,h){var c=new nt(t,e,i,r,s,n,o,a,l,h);this._font_chars.push(c),this._font_chars_dic[t]=c},e.assetType="[asset BitmapFontTable]",e}(e.AssetBase),at=function(t){function e(){var e=t.call(this)||this;return e._font_styles={},e.fontName=null,e.regularFontStyle=null,e}return l(e,t),Object.defineProperty(e,"emptyFontTable",{get:function(){return this._emptyFontTable||(this._emptyFontTable=new st),this._emptyFontTable},enumerable:!1,configurable:!0}),e.registerFont=function(t){},Object.defineProperty(e.prototype,"font_styles",{get:function(){return this._font_styles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(var t in this._font_styles)this._font_styles[t].dispose();this._font_styles=null},e.prototype.replace_font_table=function(t,e){this._font_styles[t]=e},e.prototype.create_font_table=function(t,e,i){void 0===e&&(e=st.assetType),void 0===i&&(i=null),this.get_font_table(t,e,i)&&console.warn("[Font] - create_font_table - ".concat(t," - already exists"));var r=null;return e==st.assetType?r=new st(i):e==ot.assetType&&(r=new ot),r.name=t,r.font=this,this._font_styles[t]=r,r},e.prototype.get_font_table=function(t,e,i,r){void 0===e&&(e=st.assetType),void 0===r&&(r=!1);var s=this._font_styles[t];if(s){if(s.assetType!=e)throw"[Font] - get_font_table - existing table has wrong assetType";return s}if(r&&Object.keys(this._font_styles).length>0)for(var n in this._font_styles)return console.log("font style not found return different",n),this._font_styles[n];return null},e.assetType="[asset Font]",e}(e.AssetBase),lt=function(){function t(){}return t.getDeviceFont=function(t){if(t=this.getDeviceFontName(t),this._deviceFonts[t])return this._deviceFonts[t];var e=new at;return e.name=t,this._deviceFonts[t]=e,this._deviceFonts[t]},t.getDeviceFontName=function(t){if(!t)return"sans";for(var e in this.deviceFontMap){if(this.deviceFontMap[e].indexOf(t)>=0)return e}return console.warn("[DeviceFontManager] - no mapping exists for ".concat(t,"\n\t\t - falling back to ").concat("sans")),"sans"},t.deviceFontMap={},t._deviceFonts={},t}();lt.deviceFontMap.sans=["_sans","Arial"],lt.deviceFontMap["Arial Narrow"]=["Arial Narrow"],lt.deviceFontMap["Arial Black"]=["Arial Black"],lt.deviceFontMap.serif=[],lt.deviceFontMap.typewriter=[];var ht,ct=function(){function t(){}return t.defineFont_CFF=function(t,i){void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[i]||(this._embbedCFF_fonts[i]={});var r=this._embbedCFF_fonts[i][t];return r||((r=new at).name=t,this._embbedCFF_fonts[i][t]=r,r)},t.getFont_CFF=function(t,i){if(void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),!t)return lt.getDeviceFont(t);var r=i||e.AssetBase.DEFAULT_NAMESPACE;this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[r]||(this._embbedCFF_fonts[r]={});var s=this._embbedCFF_fonts[r][t];if(s)return s;for(var n in this._embbedCFF_fonts)if(this._embbedCFF_fonts[n][t])return this._embbedCFF_fonts[n][t];return lt.getDeviceFont(t)},t.defineFont=function(t,i){if(void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[i]||(this._registered_fonts[i]={}),this.deviceFontsLoading)return lt.getDeviceFont(t);var r=this._registered_fonts[i][t];return r||((r=new at).name=t,-1===this._namespaces.indexOf(i)&&this._namespaces.push(i),this._registered_fonts[i][t]=r,r)},t.registerFontForClassName=function(t,e){this._registered_fonts_by_className[e]=t},t.getFont=function(t,i){if(void 0===i&&(i=void 0),!t)return null;if(this._registered_fonts_by_className[t])return this._registered_fonts_by_className[t];var r=i||e.AssetBase.DEFAULT_NAMESPACE;this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[r]||(this._registered_fonts[r]={});var s=this._registered_fonts[r][t];if(s)return s;if(this._namespaces.length>0&&!i)for(var n=0,o=this._namespaces;n<o.length;n++){var a=o[n];if(this._registered_fonts[a][t])return this._registered_fonts[a][t]}return lt.getDeviceFont(t)},t.clearAll=function(){this.deviceFontsLoading=!1,this._registered_fonts={}},t.deviceFontsLoading=!1,t._registered_fonts={},t._registered_fonts_by_className={},t._namespaces=[],t._embbedCFF_fonts={},t}();t.FontLookUpMode=void 0,(ht=t.FontLookUpMode||(t.FontLookUpMode={})).DEFAULT="DEFAULT",ht.DEVICE="device",ht.EMBED_CFF="embeddedCFF";var ut,pt=["font","align","leftMargin","rightMargin","indent","size","color","bold","italic","underline","leading","letterSpacing"],dt=function(e){function i(i,r,s,n,o,a,l,h,c,u,p,d,_){void 0===i&&(i="_sans"),void 0===r&&(r=null),void 0===s&&(s=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===l&&(l=null),void 0===h&&(h=null),void 0===c&&(c=null),void 0===u&&(u=null),void 0===p&&(p=null),void 0===d&&(d=null),void 0===_&&(_=null);var f=e.call(this)||this;return f.fontLookUpMode=t.FontLookUpMode.DEFAULT,f._updateID=0,f._fontTableDirty=!0,f._font=null,f.tabStops=[],f._size=r,f._color=s,f._bold=n,f._italic=o,f._underline=a,f.url=l,f.link_target=h,f._align=c,f._leftMargin=u,f._rightMargin=p,f._indent=d,f._leading=_,"string"==typeof i?f.font_name=i:f.font=i,f}return l(i,e),Object.defineProperty(i.prototype,"updateID",{get:function(){return this._updateID},enumerable:!1,configurable:!0}),i.prototype.hasPropertySet=function(t){return null!==this["_"+t]},Object.defineProperty(i.prototype,"align",{get:function(){return this._align?this._align:J.LEFT},set:function(t){this._align!==t&&this._updateID++,this._align=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blockIndent",{get:function(){return this._blockIndent?this._blockIndent:0},set:function(t){this._blockIndent!==t&&this._updateID++,this._blockIndent=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leftMargin",{get:function(){return this._leftMargin?this._leftMargin:0},set:function(t){t!==this._leftMargin&&this._updateID++,this._leftMargin=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rightMargin",{get:function(){return this._rightMargin?this._rightMargin:0},set:function(t){t!==this._rightMargin&&this._updateID++,this._rightMargin=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"indent",{get:function(){return this._indent?this._indent:0},set:function(t){t!==this._indent&&this._updateID++,this._indent=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return null!==this._color?this._color:0},set:function(t){t!==this._color&&this._updateID++,this._color=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"kerning",{get:function(){return!!this._kerning&&this._kerning},set:function(t){t!==this._kerning&&this._updateID++,this._kerning=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leading",{get:function(){return this._leading?this._leading:0},set:function(t){t!==this._leading&&this._updateID++,this._leading=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"letterSpacing",{get:function(){return this._letterSpacing?this._letterSpacing:0},set:function(t){t!==this._letterSpacing&&this._updateID++,this._letterSpacing=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"size",{get:function(){return this._size?this._size:12},set:function(t){t!==this._size&&this._updateID++,this._size=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bold",{get:function(){return!!this._bold&&this._bold},set:function(t){t!==this._bold&&this._updateID++,this._bold=t,this._fontTableDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"italic",{get:function(){return!!this._italic&&this._italic},set:function(t){t!==this._italic&&this._updateID++,this._italic=t,this._fontTableDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"underline",{get:function(){return!!this._underline&&this._underline},set:function(t){t!==this._underline&&this._updateID++,this._underline=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"font_table",{get:function(){return this._font_table&&!this._fontTableDirty||this.update_font_table(),this._font_table},set:function(t){this._font_table=t,this._fontTableDirty=!1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"font_name",{get:function(){var t;return null===(t=this.font)||void 0===t?void 0:t.name},set:function(e){var i;(null===(i=this.font)||void 0===i?void 0:i.name)!=e&&(this.fontLookUpMode==t.FontLookUpMode.DEFAULT?this._font=ct.getFont(e):this.fontLookUpMode==t.FontLookUpMode.DEVICE?this._font=lt.getDeviceFont(e):this.fontLookUpMode==t.FontLookUpMode.EMBED_CFF&&(this._font=ct.getFont_CFF(e)),this._fontTableDirty=!0,this._updateID++)},enumerable:!1,configurable:!0}),i.prototype.update_font_table=function(){this._fontTableDirty=!1;var e=t.FontStyleName.STANDART;if(this._italic&&!this._bold?e=t.FontStyleName.ITALIC:!this._italic&&this._bold?e=t.FontStyleName.BOLD:this._italic&&this._bold&&(e=t.FontStyleName.BOLDITALIC),this._font){var i=this._font.get_font_table(e,st.assetType,null,!0);if(this._font_table&&!i)return;this._font_table=i||at.emptyFontTable}},Object.defineProperty(i.prototype,"font",{get:function(){return this._font},set:function(t){this._font!=t&&(this._font=t,this._fontTableDirty=!0,this._updateID++)},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t=new i(this._font,this._size,this._color,this._bold,this._italic,this._underline,this.url,this.link_target,this._align,this._leftMargin,this._rightMargin,this._indent,this._leading);return t.font_table=this._font_table,t},i.prototype.equal=function(t){for(var e=0,i=pt;e<i.length;e++){var r=i[e];if(this[r]!==t[r])return!1}return!0},i.prototype.applyToFormat=function(t){for(var e=!1,i=0,r=pt;i<r.length;i++){var s=r[i];null!==this["_"+s]&&t[s]!==this["_"+s]&&(e=!0,t[s]=this["_"+s])}return e},i.prototype.mergeFormat=function(t){for(var e=0,i=pt;e<i.length;e++){var r=i[e];this["_"+r]!==t[r]&&(this["_"+r]=null)}},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.assetType="[asset TextFormat]",i}(e.AssetBase),_t=function(t,e,i,r,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===n&&(n=0),this.x=t,this.width=e,this.height=i,this.ascent=r,this.descent=s,this.leading=n},ft=function(t){function e(e,i,r){void 0===r&&(r=0);var s=t.call(this,e)||this;return s._char=i,s._charCode=r,s.isShift=!1,s.isCTRL=!1,s.isAlt=!1,s}return l(e,t),Object.defineProperty(e.prototype,"char",{get:function(){return this._char},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"charCode",{get:function(){return this._charCode},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._char,this._charCode)},e.KEYDOWN="keydown",e.KEYUP="keyup",e}(e.EventBase),gt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.clone=function(){return new e(this.type)},e.CHANGED="onChanged",e}(e.EventBase),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.getEntity=function(){var t=this.parentTextField;return!t._textFormats[0]||t._textFormats[0].font_table.isAsset(st)||t._textFormats[0].bitmap||(this.transform.colorTransform.color=null!=t.textColor?t.textColor:t._textFormats[0].color,this._invalidateHierarchicalProperty(r.HierarchicalProperty.COLOR_TRANSFORM)),this._graphics},e.assetType="[asset TextSprite]",e}(y),yt=function(){function t(t,e){this.format=t,this.cacheId=e,this.verts=[],this.uvs=[],this._length=0,this.verts=[],this.uvs=[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(!(t>this._length)){var e=this.verts,i=this.uvs;if(0===t)return this._length=0,e.length=0,void(i.length=0);for(var r=0,s=t;r<e.length&&s>0;)s-=e[r].length,r++;s<0&&(e[r-1]=e[r-1].subarray(0,s+e[r-1].length),i[r-1]&&(i[r-1]=i[r-1].subarray(0,s+i[r-1].length))),e.length=r,this._length=t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasUV",{get:function(){return this.uvs.length>0},enumerable:!1,configurable:!0}),t.prototype.addChunk=function(t,e){if(this.verts.length!==this.uvs.length&&e)throw"You can't mix TextShape with UV and without in same place";if(e&&t.length!==e.length)throw"Position buffer and UV buffer should has equal size";this._length+=t.length,this.verts.push(t),e&&this.uvs.push(e)},Object.defineProperty(t.prototype,"tall",{get:function(){return this.verts[this.verts.length-1]},enumerable:!1,configurable:!0}),t}();class bt{constructor(){this.childNodes=[]}get innerText(){return this.rawText}}!function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE"}(ut||(ut={}));var vt=ut;class xt extends bt{constructor(t){super(),this.rawText=t,this.nodeType=vt.COMMENT_NODE}get text(){return this.rawText}toString(){return`\x3c!--${this.rawText}--\x3e`}}var wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@awayjs/core"),require("@awayjs/stage"),require("@awayjs/view"),require("@awayjs/graphics"),require("@awayjs/renderer"),require("@awayjs/materials")):"function"==typeof define&&define.amd?define(["exports","@awayjs/core","@awayjs/stage","@awayjs/view","@awayjs/graphics","@awayjs/renderer","@awayjs/materials"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).AwayjsScene={},t.AwayjsCore,t.AwayjsStage,t.AwayjsView,t.AwayjsGraphics,t.AwayjsRenderer,t.AwayjsMaterials)}(this,(function(t,e,i,r,s,n,o){"use strict";var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},a(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}"function"==typeof SuppressedError&&SuppressedError;var h,c,u=function(t){function i(){var e=t.call(this)||this;return e._pObjects=new Array,e}return l(i,t),i.prototype.getNewObject=function(){var t=this._pCreateObject();return this._pObjects.push(t),t},i.prototype._pCreateObject=function(){throw new e.AbstractMethodError},i.prototype._iValidate=function(){},i}(e.AssetBase),p=function(t){function r(e,r){void 0===e&&(e=null),void 0===r&&(r="triangle");var s=t.call(this)||this;if(s._primitiveDirty=!0,s._uvDirty=!0,s._scaleU=1,s._scaleV=1,s._material=e,s._elementsType=r,s._elementsType==n.ElementsType.TRIANGLE){var o=new n.TriangleElements(new i.AttributesBuffer);o.autoDeriveNormals=!1,o.autoDeriveTangents=!1,s._elements=o}else s._elementsType==n.ElementsType.LINE&&(s._elements=new n.LineElements(new i.AttributesBuffer));return s}return l(r,t),Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elementsType",{get:function(){return this._elementsType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"material",{get:function(){return this._material},set:function(t){if(t!=this._material){this._material=t;for(var e=this._pObjects.length,i=0;i<e;i++)this._pObjects[i].material=this._material}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleU",{get:function(){return this._scaleU},set:function(t){this._scaleU!=t&&(this._scaleU=t,this._pInvalidateUVs())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleV",{get:function(){return this._scaleV},set:function(t){this._scaleV!=t&&(this._scaleV=t,this._pInvalidateUVs())},enumerable:!1,configurable:!0}),r.prototype._pBuildGraphics=function(t,i){throw new e.AbstractMethodError},r.prototype._pBuildUVs=function(t,i){throw new e.AbstractMethodError},r.prototype._pInvalidatePrimitive=function(){this._primitiveDirty=!0},r.prototype._pInvalidateUVs=function(){this._uvDirty=!0},r.prototype.updateGraphics=function(){this._pBuildGraphics(this._elements,this._elementsType),this._primitiveDirty=!1},r.prototype.updateUVs=function(){this._pBuildUVs(this._elements,this._elementsType),this._uvDirty=!1},r.prototype._iValidate=function(){this._primitiveDirty&&this.updateGraphics(),this._uvDirty&&this.updateUVs()},r.prototype._pCreateObject=function(){var t=new y(null,this._material);return t.graphics.addShape(s.Shape.getShape(this._elements)),t._iSourcePrefab=this,t},r.assetType="[asset PrimitivePrefab]",r}(u),d=function(t){function e(e,i,r,s,n,o,a,l,h){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=100),void 0===n&&(n=100),void 0===o&&(o=1),void 0===a&&(a=1),void 0===l&&(l=1),void 0===h&&(h=!0);var c=t.call(this,e,i)||this;return c._width=r,c._height=s,c._depth=n,c._segmentsW=o,c._segmentsH=a,c._segmentsD=l,c._tile6=h,c}return l(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this._depth},set:function(t){this._depth=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tile6",{get:function(){return this._tile6},set:function(t){this._tile6=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsD",{get:function(){return this._segmentsD},set:function(t){this._segmentsD=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v=0,x=this._width/2,w=this._height/2,E=this._depth/2;if(e==n.ElementsType.TRIANGLE){var A=t,D=2*((this._segmentsW+1)*(this._segmentsH+1)+(this._segmentsW+1)*(this._segmentsD+1)+(this._segmentsH+1)*(this._segmentsD+1)),T=12*(this._segmentsW*this._segmentsH+this._segmentsW*this._segmentsD+this._segmentsH*this._segmentsD);for(D==A.numVertices&&null!=A.indices?(A.invalidateIndices(),A.invalidateVertices(A.positions),A.invalidateVertices(A.normals),A.invalidateVertices(A.tangents)):(A.setIndices(new Uint16Array(T)),A.setPositions(new Float32Array(3*D)),A.setNormals(new Float32Array(3*D)),A.setTangents(new Float32Array(3*D)),this._pInvalidateUVs()),i=A.indices.get(A.numElements),r=A.positions.get(D),s=A.normals.get(D),o=A.tangents.get(D),a=A.concatenatedBuffer.stride/4,_=0,f=0,g=this._width/this._segmentsW,m=this._height/this._segmentsH,y=this._depth/this._segmentsD,p=0;p<=this._segmentsW;p++)for(b=p*g-x,d=0;d<=this._segmentsH;d++)r[_]=b,r[_+1]=d*m-w,r[_+2]=-E,s[_]=0,s[_+1]=0,s[_+2]=-1,o[_]=1,o[_+1]=0,o[_+2]=0,r[_+=a]=b,r[_+1]=d*m-w,r[_+2]=E,s[_]=0,s[_+1]=0,s[_+2]=1,o[_]=-1,o[_+1]=0,o[_+2]=0,_+=a,p&&d&&(c=(l=2*((p-1)*(this._segmentsH+1)+(d-1)))+2,u=(h=2*(p*(this._segmentsH+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1);for(v+=2*(this._segmentsW+1)*(this._segmentsH+1),p=0;p<=this._segmentsW;p++)for(b=p*g-x,d=0;d<=this._segmentsD;d++)r[_]=b,r[_+1]=w,r[_+2]=d*y-E,s[_]=0,s[_+1]=1,s[_+2]=0,o[_]=1,o[_+1]=0,o[_+2]=0,r[_+=a]=b,r[_+1]=-w,r[_+2]=d*y-E,s[_]=0,s[_+1]=-1,s[_+2]=0,o[_]=1,o[_+1]=0,o[_+2]=0,_+=a,p&&d&&(c=(l=v+2*((p-1)*(this._segmentsD+1)+(d-1)))+2,u=(h=v+2*(p*(this._segmentsD+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1);for(v+=2*(this._segmentsW+1)*(this._segmentsD+1),p=0;p<=this._segmentsD;p++)for(b=E-p*y,d=0;d<=this._segmentsH;d++)r[_]=-x,r[_+1]=d*m-w,r[_+2]=b,s[_]=-1,s[_+1]=0,s[_+2]=0,o[_]=0,o[_+1]=0,o[_+2]=-1,r[_+=a]=x,r[_+1]=d*m-w,r[_+2]=b,s[_]=1,s[_+1]=0,s[_+2]=0,o[_]=0,o[_+1]=0,o[_+2]=1,_+=a,p&&d&&(c=(l=v+2*((p-1)*(this._segmentsH+1)+(d-1)))+2,u=(h=v+2*(p*(this._segmentsH+1)+(d-1)))+2,i[f++]=l,i[f++]=c,i[f++]=u,i[f++]=l,i[f++]=u,i[f++]=h,i[f++]=h+1,i[f++]=u+1,i[f++]=c+1,i[f++]=h+1,i[f++]=c+1,i[f++]=l+1)}else if(e==n.ElementsType.LINE){var S=t,C=4*this._segmentsH+4*this._segmentsW+4*this._segmentsD;r=new Float32Array(6*C);var P=new Float32Array(C);for(_=0,f=0,p=0;p<this._segmentsH;++p)r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,r[_++]=x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,P[f++]=1,r[_++]=-x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsW;++p)r[_++]=p*this._width/this._segmentsW-x,r[_++]=-w,r[_++]=-E,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=-E,P[f++]=1,r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=E,r[_++]=x-p*this._width/this._segmentsW,r[_++]=w,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsH;++p)r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=-E,r[_++]=-x,r[_++]=p*this._height/this._segmentsH-w,r[_++]=E,P[f++]=1,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=-E,r[_++]=x,r[_++]=w-p*this._height/this._segmentsH,r[_++]=E,P[f++]=1;for(p=0;p<this._segmentsD;++p)r[_++]=x,r[_++]=-w,r[_++]=p*this._depth/this._segmentsD-E,r[_++]=x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,P[f++]=1,r[_++]=-x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,r[_++]=-x,r[_++]=w,r[_++]=E-p*this._depth/this._segmentsD,P[f++]=1;for(p=0;p<this._segmentsD;++p)r[_++]=-x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,r[_++]=x,r[_++]=-w,r[_++]=E-p*this._depth/this._segmentsD,P[f++]=1,r[_++]=-x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,r[_++]=x,r[_++]=w,r[_++]=p*this._depth/this._segmentsD-E,P[f++]=1;for(p=0;p<this._segmentsW;++p)r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=-E,r[_++]=x-p*this._width/this._segmentsW,r[_++]=-w,r[_++]=E,P[f++]=1,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=-E,r[_++]=p*this._width/this._segmentsW-x,r[_++]=w,r[_++]=E,P[f++]=1;S.setPositions(r),S.setThickness(P)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y;if(e==n.ElementsType.TRIANGLE){y=2*((this._segmentsW+1)*(this._segmentsH+1)+(this._segmentsW+1)*(this._segmentsD+1)+(this._segmentsH+1)*(this._segmentsD+1));var b=t;for(b.uvs&&y==b.numVertices?b.invalidateVertices(b.uvs):b.setUVs(new Float32Array(2*y)),o=b.uvs.get(y),a=b.uvs.stride,this._tile6?(l=c=1/3,h=u=.5):(l=h=1,c=u=0),s=0,p=1*c,d=1*u,_=2*c,f=0*u,g=l/this._segmentsW,m=h/this._segmentsH,i=0;i<=this._segmentsW;i++)for(r=0;r<=this._segmentsH;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+(l-i*g))*this._scaleU,o[s+1]=(f+(h-r*m))*this._scaleV,s+=a;for(p=1*c,d=0*u,_=0*c,f=0*u,g=l/this._segmentsW,m=h/this._segmentsD,i=0;i<=this._segmentsW;i++)for(r=0;r<=this._segmentsD;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+i*g)*this._scaleU,o[s+1]=(f+r*m)*this._scaleV,s+=a;for(p=0*c,d=1*u,_=2*c,f=1*u,g=l/this._segmentsD,m=h/this._segmentsH,i=0;i<=this._segmentsD;i++)for(r=0;r<=this._segmentsH;r++)o[s]=(p+i*g)*this._scaleU,o[s+1]=(d+(h-r*m))*this._scaleV,o[s+=a]=(_+(l-i*g))*this._scaleU,o[s+1]=(f+(h-r*m))*this._scaleV,s+=a}else n.ElementsType.LINE},e}(p),_=function(t){function e(e,i,r,s,n,o){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=16),void 0===n&&(n=12),void 0===o&&(o=!0);var a=t.call(this,e,i)||this;return a._radius=r,a._segmentsW=s,a._segmentsH=n,a._yUp=o,a}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_;if(e==n.ElementsType.TRIANGLE){var f=t;(_=(this._segmentsH+1)*(this._segmentsW+1))==f.numVertices&&null!=f.indices?(f.invalidateIndices(),f.invalidateVertices(f.positions),f.invalidateVertices(f.normals),f.invalidateVertices(f.tangents)):(f.setIndices(new Uint16Array((this._segmentsH-1)*this._segmentsW*6)),f.setPositions(new Float32Array(3*_)),f.setNormals(new Float32Array(3*_)),f.setTangents(new Float32Array(3*_)),this._pInvalidateUVs()),i=f.indices.get(f.numElements),r=f.positions.get(_),s=f.normals.get(_),o=f.tangents.get(_),a=f.concatenatedBuffer.stride/4,c=0,u=0;var g=void 0,m=void 0,y=void 0;for(h=0;h<=this._segmentsH;++h){g=c;var b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(l=0;l<=this._segmentsW;++l){var w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=x*Math.sin(w),D=1/Math.sqrt(E*E+A*A+v*v),T=Math.sqrt(A*A+E*E);if(this._yUp?(m=0,y=T>.007?E/T:0,p=-v,d=A):(m=T>.007?E/T:0,y=0,p=A,d=v),l==this._segmentsW?(r[c]=r[g],r[c+1]=r[g+1],r[c+2]=r[g+2],s[c]=s[g]+E*D*.5,s[c+1]=s[g+1]+p*D*.5,s[c+2]=s[g+2]+d*D*.5,o[c]=T>.007?-A/T:1,o[c+1]=m,o[c+2]=y):(r[c]=E,r[c+1]=p,r[c+2]=d,s[c]=E*D,s[c+1]=p*D,s[c+2]=d*D,o[c]=T>.007?-A/T:1,o[c+1]=m,o[c+2]=y),l>0&&h>0){var S=(this._segmentsW+1)*h+l,C=(this._segmentsW+1)*h+l-1,P=(this._segmentsW+1)*(h-1)+l-1,I=(this._segmentsW+1)*(h-1)+l;h==this._segmentsH?(r[c]=r[g],r[c+1]=r[g+1],r[c+2]=r[g+2],i[u++]=S,i[u++]=P,i[u++]=I):1==h?(i[u++]=S,i[u++]=C,i[u++]=P):(i[u++]=S,i[u++]=C,i[u++]=P,i[u++]=S,i[u++]=P,i[u++]=I)}c+=a}}}else if(e==n.ElementsType.LINE){var O=t,N=this._segmentsH*this._segmentsW*2+this._segmentsW,L=new Float32Array(6*N),M=new Float32Array(N);for(c=0,u=0,h=0;h<=this._segmentsH;++h){b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(l=0;l<=this._segmentsW;++l){w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=x*Math.sin(w);if(this._yUp?(p=-v,d=A):(p=A,d=v),l>0&&(L[c++]=E,L[c++]=p,L[c++]=d,M[u++]=1,h>0)){var F=1==h?3-(6*(this._segmentsW-l)+12*l):3-12*this._segmentsW;L[c]=L[c+++F],L[c]=L[c+++F],L[c]=L[c+++F],L[c++]=E,L[c++]=p,L[c++]=d,M[u++]=1}l<this._segmentsW&&(L[c++]=E,L[c++]=p,L[c++]=d)}}O.setPositions(L),O.setThickness(M)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a=(this._segmentsH+1)*(this._segmentsW+1);if(e==n.ElementsType.TRIANGLE){a=(this._segmentsH+1)*(this._segmentsW+1);var l=t;l.uvs&&a==l.numVertices?l.invalidateVertices(l.uvs):l.setUVs(new Float32Array(2*a)),s=l.uvs.get(a),o=l.uvs.stride;var h=0;for(r=0;r<=this._segmentsH;++r)for(i=0;i<=this._segmentsW;++i)s[h]=i/this._segmentsW*this._scaleU,s[h+1]=r/this._segmentsH*this._scaleV,h+=o}else n.ElementsType.LINE},e}(p),f=e.ConfigManager.instance.addStore("scene",{ALLOW_FORCE_MSAA:8,MSAA_MINIMAL_IMAGE_SIZE:300,ALLOW_APPROXIMATION:0,USE_UNSAFE_SCALE_9_SLICE:!1,USE_UNSAFE_FILTERS:!1,USE_UNSAFE_BLENDS:!1,REMAP_BLEND_MODE:!0,BLEND_MODE_REMAP_TABLE:(h={},h[i.BlendMode.DARKEN]=i.BlendMode.MULTIPLY,h),CPU_COPY_PIXELS_COUNT:4096,FONT_TESSELATION_QUALITY:.1,USE_UNSAFE_FNT:!1,TEXT_SHAPE_ROUND_PRECISION:.1}),g=function(t){function s(){var s=t.call(this)||this;return s._renderObjects={},s._containerNodes={},s._mouseChildren=!0,s._sessionID=-1,s._avmDepthID=-1,s._alignmentMode=r.AlignmentMode.REGISTRATION_POINT,s._visible=!0,s._maskId=-1,s._mouseEnabled=!0,s._maskMode=!1,s.isSlice9ScaledMC=!1,s.isSlice9ScaledSprite=!1,s.isAVMScene=!1,s.placeObjectTag=null,s._blendMode=i.BlendMode.NORMAL,s.castsShadows=!0,s._filters=null,s.orientationMode=r.OrientationMode.DEFAULT,s.zOffset=0,s.hasDispatchedAddedToStage=!1,s.abstractions=new e.AbstractionSet(s),s.cursorType="",s._isInFocus=!1,s._tabEnabled=!1,s._tabIndex=-1,s._avmDepthID=-1,s._onInvalidatePropertiesDelegate=function(t){return s._onInvalidateProperties(t)},s._onInvalidateImagesDelegate=function(t){return s._onInvalidateImages(t)},s._transform=new e.Transform(null),s._transform.addEventListener(e.TransformEvent.INVALIDATE_MATRIX3D,(function(t){return s._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)})),s._transform.addEventListener(e.TransformEvent.INVALIDATE_COLOR_TRANSFORM,(function(t){return s._invalidateHierarchicalProperty(r.HierarchicalProperty.COLOR_TRANSFORM)})),s._defaultBoundingVolume=s._getDefaultBoundingVolume(),s}return l(s,t),s.prototype.getScriptPrecedence=function(){if(!this._parent)return[];var t=this._parent.getScriptPrecedence();return this.placeObjectTag&&t.push(this.placeObjectTag.actionBlocksPrecedence),t},s.prototype.getMouseCursor=function(){return"initial"},Object.defineProperty(s.prototype,"tabEnabled",{get:function(){return this._tabEnabled},set:function(t){this._tabEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(t){this._tabIndex=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInFocus",{get:function(){return this._isInFocus},set:function(t){this._isInFocus=t},enumerable:!1,configurable:!0}),s.prototype.setFocus=function(t,e,i){this._isInFocus!=t&&(this._isInFocus=t)},Object.defineProperty(s.prototype,"alignmentMode",{get:function(){return this._alignmentMode},set:function(t){this._alignmentMode!=t&&(this._alignmentMode=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"alpha",{get:function(){return this._transform.colorTransform.alphaMultiplier},set:function(t){this._transform.colorTransform.alphaMultiplier=t,this._transform.invalidateColorTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"blendMode",{get:function(){return f.USE_UNSAFE_BLENDS?f.REMAP_BLEND_MODE&&f.BLEND_MODE_REMAP_TABLE[this._blendMode]||this._blendMode:""},set:function(t){this._blendMode!==t&&(this._blendMode=t,t===i.BlendMode.OVERLAY&&this._transform.invalidateColorTransform(),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"defaultBoundingVolume",{get:function(){return this._defaultBoundingVolume},set:function(t){this._defaultBoundingVolume!=t&&(this._defaultBoundingVolume=t,this._boundsPrimitive&&(this._boundsPrimitive.dispose(),this._boundsPrimitive=null),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(t){this._cacheAsBitmap!=t&&(this._cacheAsBitmap=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"eulers",{get:function(){return this._eulers||(this._eulers=new e.Vector3D),this._eulers.x=this.rotationX,this._eulers.y=this.rotationY,this._eulers.z=this.rotationZ,this._eulers},set:function(t){this._transform.rotation.x=t.x,this._transform.rotation.y=t.y,this._transform.rotation.z=t.z,this._transform.invalidateMatrix3D()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"filters",{get:function(){return this._filters},set:function(t){f.USE_UNSAFE_FILTERS&&(this._filters=t,this._invalidateStyle(),this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},enumerable:!1,configurable:!0}),s.prototype.updateFilters=function(t){console.warn("[scene/DisplayObject] - updateFilters is just a stub")},Object.defineProperty(s.prototype,"index",{get:function(){return this._parent?this._parent.getChildIndex(this):0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"loader",{get:function(){return this._loader},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask!==t&&(this._mask&&(this._mask.maskMode=!1),this._mask=t,t&&(t.maskMode=!0),this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"maskMode",{get:function(){return this._maskMode},set:function(t){this._maskMode!=t&&(this._maskMode=t,this._maskId=t?this.id:-1,this._updateMaskMode())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pickObject",{get:function(){return this._pickObject},set:function(t){this._pickObject!=t&&(this._pickObject=t==this?null:t.pickObjectFromTimeline?t.clone():t,this._pickObject&&(this._pickObject.mouseChildren=!1,this._pickObject.mouseEnabled=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseEnabled",{get:function(){return this._mouseEnabled},set:function(t){this._mouseEnabled!=t&&(this._mouseEnabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseX",{get:function(){return this._mouseX},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseY",{get:function(){return this._mouseY},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"name",{get:function(){return this._pName?this._pName:""},set:function(t){this._pName=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"registrationPoint",{get:function(){return this._registrationMatrix3D?new e.Vector3D(-this._registrationMatrix3D._rawData[12]*this.scaleX,-this._registrationMatrix3D._rawData[13]*this.scaleY,-this._registrationMatrix3D._rawData[14]*this.scaleZ):null},set:function(t){if(t)this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[12]=-t.x/this._transform.scale.x,this._registrationMatrix3D._rawData[13]=-t.y/this._transform.scale.y,this._registrationMatrix3D._rawData[14]=-t.z/this._transform.scale.z;else{if(!this._registrationMatrix3D)return;this._registrationMatrix3D._rawData[12]=0,this._registrationMatrix3D._rawData[13]=0,this._registrationMatrix3D._rawData[14]=0,this._registrationMatrix3D.isIdentity()&&(this._registrationMatrix3D=null)}this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"registrationScale",{get:function(){return this._registrationMatrix3D?new e.Vector3D(this._registrationMatrix3D._rawData[0],this._registrationMatrix3D._rawData[5],this._registrationMatrix3D._rawData[10]):null},set:function(t){if(t)this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[0]=t.x,this._registrationMatrix3D._rawData[5]=t.y,this._registrationMatrix3D._rawData[10]=t.z;else{if(!this._registrationMatrix3D)return;this._registrationMatrix3D._rawData[0]=1,this._registrationMatrix3D._rawData[5]=1,this._registrationMatrix3D._rawData[10]=1,this._registrationMatrix3D.isIdentity()&&(this._registrationMatrix3D=null)}this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"root",{get:function(){return this._root},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationX",{get:function(){return this._transform.rotation.x},set:function(t){this.rotationX!=t&&(this._transform.rotation.x=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationY",{get:function(){return this._transform.rotation.y},set:function(t){this.rotationY!=t&&(this._transform.rotation.y=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotationZ",{get:function(){return this._transform.rotation.z},set:function(t){this.rotationZ!=t&&(this._transform.rotation.z=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scale9Grid",{get:function(){return this._scale9Grid},set:function(t){this._scale9Grid=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCALE9)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleX",{get:function(){return this._transform.scale.x},set:function(t){this._setScaleX(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleY",{get:function(){return this._transform.scale.y},set:function(t){this._setScaleY(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleZ",{get:function(){return this._transform.scale.z},set:function(t){this._setScaleZ(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewX",{get:function(){return this._transform.skew.x},set:function(t){this.skewX!=t&&(this._transform.skew.x=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewY",{get:function(){return this._transform.skew.y},set:function(t){this.skewY!=t&&(this._transform.skew.y=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skewZ",{get:function(){return this._transform.skew.z},set:function(t){this.skewZ!=t&&(this._transform.skew.z=t,this._transform.invalidateMatrix3D())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scrollRect",{get:function(){var t;return null===(t=this._scrollRect)||void 0===t?void 0:t.clone()},set:function(t){var e=!0;!!this._scrollRect!=!!t?(this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS),this._scrollRect=null==t?void 0:t.clone()):this._scrollRect&&!this._scrollRect.equals(t)?this._scrollRect.copyFrom(t):e=!1,e&&(this._transform.invalidatePosition(),t?(this._scrollRectPrimitive||(this._scrollRectPrimitive=new y,this._scrollRectPrimitive.maskMode=!0),this._scrollRectPrimitive.graphics.clear(),this._scrollRectPrimitive.graphics.beginFill(255,1),this._scrollRectPrimitive.graphics.drawRect(t.x,t.y,t.width,t.height),this._scrollRectPrimitive.graphics.endFill()):this._scrollRectPrimitive&&(this._scrollRectPrimitive=null))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"material",{get:function(){return this._material},set:function(t){this._material!=t&&(this._material=t,this._invalidateMaterial())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"style",{get:function(){return this._style},set:function(t){this._style!=t&&(this._style&&(this._style.removeEventListener(n.StyleEvent.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this._style.removeEventListener(n.StyleEvent.INVALIDATE_IMAGES,this._onInvalidateImagesDelegate)),this._style=t,this._style&&(this._style.addEventListener(n.StyleEvent.INVALIDATE_PROPERTIES,this._onInvalidatePropertiesDelegate),this._style.addEventListener(n.StyleEvent.INVALIDATE_IMAGES,this._onInvalidateImagesDelegate)),this._invalidateStyle())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"boundsVisible",{get:function(){return this._boundsVisible},set:function(t){t!=this._boundsVisible&&(this._boundsVisible=t,this.invalidate())},enumerable:!1,configurable:!0}),s.prototype.getScrollRectPrimitive=function(){return this._scrollRectPrimitive},s.prototype.getBoundsPrimitive=function(t){if(null==this._boundsPrimitive){switch(this._defaultBoundingVolume){case r.BoundingVolumeType.BOX:case r.BoundingVolumeType.BOX_BOUNDS:case r.BoundingVolumeType.BOX_BOUNDS_FAST:case r.BoundingVolumeType.BOX_FAST:this._boundsPrefab=new d(null,n.ElementsType.LINE),this._boundsPrimitive=this._boundsPrefab.getNewObject();break;case r.BoundingVolumeType.SPHERE:case r.BoundingVolumeType.SPHERE_BOUNDS:case r.BoundingVolumeType.SPHERE_BOUNDS_FAST:case r.BoundingVolumeType.SPHERE_FAST:this._boundsPrefab=new _(null,n.ElementsType.LINE),this._boundsPrimitive=this._boundsPrefab.getNewObject()}this._boundsPrefabDirty=!0}return this._boundsPrefabDirty&&this._updateBoundsPrefab(t),this._boundsPrimitive},Object.defineProperty(s.prototype,"transform",{get:function(){return this._transform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible!=t&&(this._visible=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.VISIBLE))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"timelineMasks",{get:function(){return this._timelineMasks},set:function(t){var e=this._timelineMasks?this._timelineMasks:[];if(t)for(var i=t.length-1;i>=0;i--){var s=t[i];if(s){var n=e.indexOf(s);-1!=n?e.splice(n,1):s.maskMode=!0}else console.warn("[DisplayObject] Timeline mask has null value, skipping it"),t.splice(i,1)}for(i=e.length-1;i>=0;i--)e[i].maskMode=!1;this._timelineMasks=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASKS)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mouseChildren",{get:function(){return this._mouseChildren},set:function(t){this._mouseChildren!=t&&(this._mouseChildren=t,this._invalidateHierarchicalProperty(r.HierarchicalProperty.MOUSE_ENABLED))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"x",{get:function(){return this._transform.position.x},set:function(t){this._transform.position.x!=t&&(this._transform.matrix3D._rawData[12]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this._transform.position.y},set:function(t){this._transform.position.y!=t&&(this._transform.matrix3D._rawData[13]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"z",{get:function(){return this._transform.position.z},set:function(t){this._transform.position.z!=t&&(this._transform.matrix3D._rawData[14]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),s.prototype.advanceFrame=function(){},s.prototype.getEntity=function(){this._iController&&this._iController.update()},s.prototype._initNode=function(t){},s.prototype.clone=function(){var t=new s;return this.copyTo(t),t},s.prototype.copyTo=function(t){var e;t.defaultBoundingVolume=this._defaultBoundingVolume,this._registrationMatrix3D&&(t._registrationMatrix3D=this._registrationMatrix3D.clone()),t.mouseChildren=this._mouseChildren,t.material=this._material,t.style=this._style,t.pickObject=this._pickObject,t.pickObjectFromTimeline=this.pickObjectFromTimeline,t.boundsVisible=this._boundsVisible,t.name=this._pName,t.mouseEnabled=this._mouseEnabled,t.extra=this.extra,t.maskMode=this._maskMode,t.castsShadows=this.castsShadows,t.assetNamespace=this.assetNamespace,t._symbol=this._symbol,t.avm1Symbol=this.avm1Symbol,t.isAVMScene=this.isAVMScene,t.isSlice9ScaledMC=this.isSlice9ScaledMC,t.scale9Grid=null===(e=this.scale9Grid)||void 0===e?void 0:e.clone(),this._timelineMasks&&(t._timelineMasks=this._timelineMasks.slice()),t._mask=this._mask,this._transform.copyRawDataTo(t._transform)},s.prototype.dispose=function(){this.disposeValues()},s.prototype.disposeValues=function(){this._parent&&this._parent.removeChild(this),this.material=null,this._adapter&&(this._adapter.dispose(),this._adapter=null),this._pickObject=null,delete this._timelineMasks,delete this._mask},s.prototype.lookAt=function(t,e){void 0===e&&(e=null),this.transform.lookAt(t,e)},s.prototype.movePivot=function(t,i,s){0==t&&0==i&&0==s||(this._registrationMatrix3D||(this._registrationMatrix3D=new e.Matrix3D),this._registrationMatrix3D._rawData[12]-=t/this._transform.scale.x,this._registrationMatrix3D._rawData[13]-=i/this._transform.scale.y,this._registrationMatrix3D._rawData[14]-=s/this._transform.scale.z,this._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM))},s.prototype.reset=function(){this.visible=!0,this.noTimelineUpdate||this._transform.clearMatrix3D(),this._transform.clearColorTransform(),this.mask=void 0,this.timelineMasks=void 0,this.maskMode=!1},s.prototype.isOnDisplayList=function(){for(var t=this;t;){if(t.isAVMScene)return!0;t=t.parent}return!1},s.prototype._setParent=function(t){this._parent=t},s.prototype._invalidateHierarchicalProperty=function(t){for(var e in this._containerNodes)this._containerNodes[e].invalidateHierarchicalProperty(t)},Object.defineProperty(s.prototype,"maskId",{get:function(){return this._maskId},enumerable:!1,configurable:!0}),s.prototype._setScaleX=function(t){this.scaleX!=t&&(this._transform.scale.x=t,this._transform.invalidateMatrix3D())},s.prototype._setScaleY=function(t){this.scaleY!=t&&(this._transform.scale.y=t,this._transform.invalidateMatrix3D())},s.prototype._setScaleZ=function(t){this.scaleZ!=t&&(this._transform.scale.z=t,this._transform.invalidateMatrix3D())},s.prototype._updateBoundsPrefab=function(t){if(this._boundsPrefab instanceof d){var i=t.getBoundingVolume(null,this._defaultBoundingVolume).getBox();if(null==i)return;this._boundsPrefab.width=i.width,this._boundsPrefab.height=i.height,this._boundsPrefab.depth=i.depth,this._boundsPrimitive.registrationPoint=new e.Vector3D(-(i.x+i.width/2)*this._boundsPrimitive.transform.scale.x,-(i.y+i.height/2)*this._boundsPrimitive.transform.scale.y,-(i.z+i.depth/2)*this._boundsPrimitive.transform.scale.z)}else if(this._boundsPrefab instanceof _){var r=t.getBoundingVolume(null,this._defaultBoundingVolume).getSphere();if(null==r)return;this._boundsPrefab.radius=r.radius,this._boundsPrimitive.registrationPoint=new e.Vector3D(-r.x*this._boundsPrimitive.transform.scale.x,-r.y*this._boundsPrimitive.transform.scale.y,-r.z*this._boundsPrimitive.transform.scale.z)}},s.prototype._updateMaskMode=function(){this._maskMode&&(this._mouseEnabled=!1),this._invalidateHierarchicalProperty(r.HierarchicalProperty.MASK_ID)},s.prototype._invalidateMaterial=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateMaterial()},s.prototype._invalidateStyle=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateStyle()},s.prototype.invalidateElements=function(){for(var t in this._renderObjects)this._renderObjects[t]._onInvalidateElements()},s.prototype._onInvalidateProperties=function(t){this._invalidateStyle()},s.prototype._onInvalidateImages=function(t){this.invalidate()},s.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.BOX_BOUNDS_FAST},s.prototype.requestAbstraction=function(t){return s._store.length?s._store.pop():new r.ContainerNode},s.prototype.storeAbstraction=function(t){s._store.push(t)},s.prototype.getNode=function(t){return this.abstractions.getAbstraction(t)},s._store=[],s}(e.AssetBase),m=function(t){function i(){var e=t.call(this)||this;return e._children=[],e.doingSwap=!1,e.tabChildren=!1,e}return l(i,t),Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"animator",{get:function(){return this._animator},set:function(t){this._animator&&this._animator.removeOwner(this),this._animator=t,this._animator&&this._animator.addOwner(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!1,configurable:!0}),i.prototype.advanceFrame=function(){for(var t=0;t<this._children.length;t++)this._children[t].advanceFrame()},i.prototype.addChild=function(t){return this.addChildAt(t,this._children.length)},i.prototype.addChildAt=function(t,e){for(var i in t.parent&&t.parent.removeChild(t),this._children.splice(e,0,t),t._setParent(this),this._containerNodes)this._containerNodes[i].addChildAt(t,e);return t},i.prototype.addChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t.length,r=0;r<i;r++)this.addChild(t[r])},i.prototype.clone=function(){var t=new i;return this.copyTo(t),t},i.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),this._animator&&(e.animator=this._animator.clone());for(var i=this._children.length,r=0;r<i;++r){var s=this._children[r].adapter.clone().adaptee;e.addChild(s)}},i.prototype.contains=function(t){return this._children.indexOf(t)>=0},i.prototype.disposeValues=function(){this._animator&&this._animator.dispose();for(var e=this._children.length-1;e>=0;e--)this.removeChild(this._children[e]);t.prototype.disposeValues.call(this)},i.prototype.getChildAt=function(t){var i=this._children[t];if(null==i)throw new e.RangeError("Index does not exist in the child list of the caller");return i},i.prototype.getChildByName=function(t){for(var e=this._children.length,i=0;i<e;++i)if(this._children[i].name==t)return this._children[i];return null},i.prototype.getChildIndex=function(t){var e=this._children.indexOf(t);if(-1==e)throw i.NO_CHILD_ERROR;return e},i.prototype.getObjectsUnderPoint=function(t){return new Array},i.prototype.removeChild=function(t){if(null==t)throw new e.ArgumentError("Parameter child cannot be null");return this.removeChildAt(this.getChildIndex(t)),t},i.prototype.removeChildAt=function(t){return this.removeChildAtInternal(t)},i.prototype.removeChildren=function(t,i){if(void 0===t&&(t=0),void 0===i&&(i=2147483647),t<0)throw new e.RangeError("beginIndex is out of range of the child list");if(i>this._children.length)throw new e.RangeError("endIndex is out of range of the child list");for(var r=i-1;r>=t;r--)this.removeChildAtInternal(r)},i.prototype.setChildIndex=function(t,i){var r=this.getChildIndex(t);if(r<0)throw new e.ArgumentError("Parameter child must be child of this object");if(i>this._children.length-1)throw new e.RangeError("Parameter index is out of range of the child list");r!=i&&(this.removeChildAt(r),this.addChildAt(t,i),t._sessionID>=0&&this._sessionID_childs&&(delete this._sessionID_childs[t._sessionID],t._sessionID=-1))},i.prototype.swapChildren=function(t,e){t.parent==this&&e.parent==this&&this.swapChildrenAt(this.getChildIndex(t),this.getChildIndex(e))},i.prototype.swapChildrenAt=function(t,e){if(t!=e){if(t>=this._children.length||e>=this._children.length)throw"[scene/DisplayobjectContainer] - swapChildrenAt - Range Error";var i,r;t<e?(r=this.removeChildAt(e),i=this.removeChildAt(t),this.addChildAt(r,t),this.addChildAt(i,e)):(i=this.removeChildAt(t),r=this.removeChildAt(e),this.addChildAt(i,e),this.addChildAt(r,t)),this._sessionID_childs&&(this._children[t]._sessionID>=0&&(delete this._sessionID_childs[this._children[t]._sessionID],this._children[t]._sessionID,this._children[t]._avmDepthID),this._children[e]._sessionID>=0&&(delete this._sessionID_childs[this._children[e]._sessionID],this._children[e]._sessionID,this._children[t]._avmDepthID))}},i.prototype._initNode=function(t){for(var e=0;e<this._children.length;++e)t.addChildAt(this._children[e],e)},i.prototype.removeChildAtInternal=function(t){var e=this._children.splice(t,1)[0];for(var i in e.adapter&&e.adapter.dispatchStaticEvent&&e.adapter.dispatchStaticEvent("removed",e.adapter),this.isOnDisplayList()&&e.adapter.dispatch_REMOVED_FROM_STAGE&&e.adapter.dispatch_REMOVED_FROM_STAGE(e),e._setParent(null),this._containerNodes)this._containerNodes[i].removeChildAt(t);return e},i.prototype._updateMaskMode=function(){this.maskMode&&(this.mouseChildren=!1),t.prototype._updateMaskMode.call(this)},i.assetType="[asset DisplayObjectContainer]",i.NO_CHILD_ERROR=new e.ArgumentError("Child parameter is not a child of the caller"),i}(g),y=function(t){function e(e,i){void 0===e&&(e=null),void 0===i&&(i=null);var r=t.call(this)||this;return r.graphics=e,r.material=i,r}return l(e,t),e.getNewSprite=function(t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),e._sprites.length){var r=e._sprites.pop();return r.graphics=t,r.material=i,r}return new e(t,i)},e.clearPool=function(){e._sprites=[]},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){return this._graphics||(this.graphics=s.Graphics.getGraphics()),this._graphics},set:function(t){this._graphics!=t&&(this._graphics&&this._graphics.removeOwner(this),this._graphics=t,this._graphics&&this._graphics.addOwner(this),this.invalidate(),this._adapter&&this.adapter.updateGraphics())},enumerable:!1,configurable:!0}),e.prototype.getEntity=function(){return t.prototype.getEntity.call(this),this._iSourcePrefab&&this._iSourcePrefab._iValidate(),this._graphics},e.prototype.dispose=function(){this.disposeValues(),e._sprites.push(this)},e.prototype.disposeValues=function(){t.prototype.disposeValues.call(this)},e.prototype.clone=function(){var t=e.getNewSprite();return this.copyTo(t),t},e.prototype.copyTo=function(e,i){void 0===i&&(i=!1),t.prototype.copyTo.call(this,e),e._iSourcePrefab=this._iSourcePrefab,this._graphics&&this._graphics.copyTo(e.graphics,i)},e.prototype.bakeTransformations=function(){this._graphics.applyTransformation(this.transform.matrix3D),this.transform.clearMatrix3D()},e._sprites=[],e.assetType="[asset Sprite]",e}(m),b=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._frameCaches={},e}return l(i,t),i.getNewMorphSprite=function(t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),i._morphSprites.length){var r=i._morphSprites.pop();return r.graphics=t||s.Graphics.getGraphics(),r.material=e,r}return new i(t,e)},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.prototype.reset=function(){t.prototype.reset.call(this),this.setRatio(0)},i.prototype._blendStyle=function(t,i,r,n){var o,a,l,h=1-n,c=n,u=t.style.fillStyle,p=i.style.fillStyle;if(t.style.data_type!=i.style.data_type)throw"Error in morph data - different styles of pathes";switch(u.data_type){case s.SolidFillStyle.data_type:var d=p;a=h*(w=u).alpha+c*d.alpha,o=e.ColorUtils.interpolateFloat32Color(w.color,d.color,n),l=new s.SolidFillStyle(o,a);break;case s.GradientFillStyle.data_type:for(var _=[],f=[],g=[],m=(d=p,(w=u).colors.length),y=0;y<m;y++)_[_.length]=e.ColorUtils.interpolateFloat32Color(w.colors[y],d.colors[y],n),g[g.length]=h*w.alphas[y]+c*d.alphas[y],f[f.length]=h*w.ratios[y]+c*d.ratios[y];var b=w.matrix,v=d.matrix;(x=new e.Matrix).a=b.a*h+v.a*c,x.b=b.b*h+v.b*c,x.c=b.c*h+v.c*c,x.d=b.d*h+v.d*c,x.tx=b.tx*h+v.tx*c,x.ty=b.ty*h+v.ty*c,l=new s.GradientFillStyle(w.type,_,g,f,x,w.spreadMethod,w.interpolationMethod,w.focalPointRatio);break;case s.BitmapFillStyle.data_type:var x;d=p,b=(w=u).matrix,v=d.matrix;(x=new e.Matrix).a=b.a*h+v.a*c,x.b=b.b*h+v.b*c,x.c=b.c*h+v.c*c,x.d=b.d*h+v.d*c,x.tx=b.tx*h+v.tx*c,x.ty=b.ty*h+v.ty*c,l=new s.BitmapFillStyle(w.image,x,w.repeat,w.smooth)}if(t.style.data_type===s.GraphicsStrokeStyle.data_type){var w=t.style,E=(d=i.style,h*w.thickness+c*d.thickness);r.style=new s.GraphicsStrokeStyle(l,E,w.jointstyle,w.capstyle,w.miterLimit,w.scaleMode)}else r.style=new s.GraphicsFillStyle(l)},i.prototype._blendContours=function(t,e,i,r){var n=1-r,o=r,a=t.commands.length;if(e.commands.length!==a)throw"Error in morph data - different number of contour";for(var l=0,h=0,c=0,u=0,p=0,d=0,_=t.data,f=e.data,g=0;g<a;g++){var m=t.commands[g],y=e.commands[g];switch(m){case s.GraphicsPathCommand.MOVE_TO:if(y!=s.GraphicsPathCommand.MOVE_TO)throw"Error in morph data - both shapes must start with Move too command";c=_[l++],u=_[l++],p=f[h++],d=f[h++],i.moveTo(n*c+o*p,n*u+o*d);break;case s.GraphicsPathCommand.LINE_TO:if(y==s.GraphicsPathCommand.LINE_TO)c=_[l++],u=_[l++],p=f[h++],d=f[h++],i.lineTo(n*c+o*p,n*u+o*d);else if(y==s.GraphicsPathCommand.CURVE_TO){var b=c+(_[l++]-c)/2,v=u+(_[l++]-u)/2;i.curveTo(n*b+o*f[h++],n*v+o*f[h++],n*_[l-2]+o*f[h++],n*_[l-1]+o*f[h++]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1]}break;case s.GraphicsPathCommand.CURVE_TO:if(y==s.GraphicsPathCommand.LINE_TO){b=p+(f[h++]-p)/2,v=d+(f[h++]-d)/2;i.curveTo(n*_[l++]+o*b,n*_[l++]+o*v,n*_[l++]+o*f[h-2],n*_[l++]+o*f[h-1]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1]}else y==s.GraphicsPathCommand.CURVE_TO&&(i.curveTo(n*_[l++]+o*f[h++],n*_[l++]+o*f[h++],n*_[l++]+o*f[h++],n*_[l++]+o*f[h++]),c=_[l-2],u=_[l-1],p=f[h-2],d=f[h-1])}}},i.prototype.setRatio=function(t){var e=65535*t|0,i=this._graphics;if(this._ratio!==e){if(this._ratio=e,i.buildQueueTags?i.buildQueueTags(!0):(i.endFill(),i.clear()),i.start.length!==i.end.length)throw"Error in morph data - different number of pathes";for(var r=i.start.length,n=0;n<r;n++){var o=new s.GraphicsPath,a=i.start[n],l=i.end[n];this._blendStyle(a,l,o,t),this._blendContours(a,l,o,t),i.add_queued_path(o,!0)}i._endFillInternal(!0)}},i.prototype.dispose=function(){this.disposeValues(),this._frameCaches={},i._morphSprites.push(this)},i.prototype.clone=function(){var t=i.getNewMorphSprite();return this.copyTo(t),t},i.assetType="[asset MorphSprite]",i._morphSprites=new Array,i}(y),v=["",i.BlendMode.NORMAL,i.BlendMode.LAYER,i.BlendMode.MULTIPLY,i.BlendMode.SCREEN,i.BlendMode.LIGHTEN,i.BlendMode.DARKEN,i.BlendMode.DIFFERENCE,i.BlendMode.ADD,i.BlendMode.SUBTRACT,i.BlendMode.INVERT,i.BlendMode.ALPHA,i.BlendMode.ERASE,i.BlendMode.OVERLAY,i.BlendMode.HARDLIGHT];var x=function(){function t(t){this.factory=t,this._update_indices=[],this._update_frames=[],this.isButton=!1,this._initalMcID=-1,this.numKeyFrames=0,this.keyframe_indices=[],this.avm1Exports={},this.avm1InitActions={},this.avm1ButtonActions=[],this.graphicsPool={},this.audioPool={},this.placeObjectTagsForSessionIDs={},this._labels={},this._framescripts={},this._framescripts_translated={},this.keyframe_to_frameidx={}}return t.prototype.resetScripts=function(){this._framescripts={},this._framescripts_translated={}},t.prototype.init=function(){if(null!=this.frame_command_indices&&null!=this.frame_recipe&&null!=this.keyframe_durations){var t=0,e=0,i=0,r=0,s=0,n=0;this.keyframe_firstframes=[],this.keyframe_constructframes=[],this.keyframe_indices=[],this.keyframe_to_frameidx={},this.keyframe_to_frameidx[0]=0;var o=0;for(e=0;e<this.numKeyFrames;e++)for(this.keyframe_to_frameidx[e]=o,o+=r=this.keyframe_durations[e],1&this.frame_recipe[e]&&(n=s),this.keyframe_firstframes[s]=t,this.keyframe_constructframes[s++]=n,i=0;i<r;i++)this.keyframe_indices[t++]=e}},t.prototype.add_framescript=function(t,e,i,r){if(void 0===r&&(r=!1),!(this._initalMcID>=0&&i.id!=this._initalMcID)){if(this._initalMcID=i.id,this._framescripts[e]||(this._framescripts[e]=[]),Array.isArray(t))for(var s=0;s<t.length;s++)this._framescripts[e][this._framescripts[e].length]=t[s];else this._framescripts[e].push(t);this._framescripts_translated[e]=!r}},t.prototype.get_script_for_frame=function(t,e,i){if(void 0===i&&(i=!1),e>=0&&this._framescripts[e]){if(i&&!this._framescripts_translated[e]){var r=t.className?t.className:t.name;this._framescripts[e]=this.factory.createFrameScripts(this._framescripts[e],e,r,t.id),this._framescripts_translated[e]=!0}return this._framescripts[e]}return null},Object.defineProperty(t.prototype,"numFrames",{get:function(){return this.keyframe_indices.length},enumerable:!1,configurable:!0}),t.prototype.getKeyframeIndexForFrameIndex=function(t){return this.keyframe_indices[t]},t.prototype.getChildInstance=function(t,e){return this.factory.createChildInstanceForTimeline(this,t,e)},t.prototype.extractHitArea=function(t){t.reset(!1),this.gotoFrame(t,this.numFrames-1,!1);for(var e,i,r=t.numChildren,s=new m;r>0;)r--,(e=(i=t.getChildAt(r)).clone()).x=i.x,e.scaleX=i.scaleX,e.y=i.y,e.scaleY=i.scaleY,e.rotationZ=i.rotationZ,s.addChild(e);return s.pickObjectFromTimeline=!0,t.pickObject=s,t.reset(!1),s},t.prototype.getCurrentFrameLabel=function(t){var e=this.keyframe_to_frameidx[t.constructedKeyFrameIndex];for(var i in this._labels)if(this._labels[i].keyFrameIndex==t.constructedKeyFrameIndex&&e==t.currentFrameIndex)return this._labels[i].name;return null},t.prototype.getCurrentLabel=function(t){var e=null,i=-1;for(var r in this._labels){var s=this._labels[r].keyFrameIndex;s>i&&s<=t.constructedKeyFrameIndex&&(i=s,e=this._labels[r].name)}return e},t.prototype.jumpToLabel=function(t,e,i){if(void 0===i&&(i=0),this._labels[e]){var r=this._labels[e].keyFrameIndex;r>=0&&(t.currentFrameIndex=this.keyframe_firstframes[r]+i)}else console.warn("[TIMELINE] - jumpToLabel with invalid label",t,e,i)},t.prototype.getScriptForLabel=function(t,e,i){void 0===i&&(i=!1);var r=this._labels[e.toLowerCase()].keyFrameIndex;if(r<0)return null;var s=this.keyframe_firstframes[r];return s>=0&&this._framescripts[s]?this.get_script_for_frame(t,s,i):null},t.prototype.gotoFrame=function(t,e,i,r,s){void 0===i&&(i=!0),void 0===r&&(r=!1),void 0===s&&(s=!1);var n=t.constructedKeyFrameIndex,o=this.keyframe_indices[e];if(n!=o||s)if(n+1!=o){var a=this.keyframe_constructframes[o],l=a,h=o>n;h&&n>a&&(l=n+1),t.adapter.constructFrame(this,l,o,h,e,r,i),this.applyCollectedUpdateCommands(t),t.constructedKeyFrameIndex=o}else this.constructNextFrame(t,i,!0);else t.adapter.queueFrameScripts(this,e,i)},t.prototype.applyCollectedUpdateCommands=function(t){var e,i=this._update_indices.length;for(e=0;e<i;e++)this.update_childs(t,this._update_indices[e],this._update_frames[e])},t.prototype.constructNextFrame=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var r=t.currentFrameIndex,s=this.keyframe_indices[r];if(e&&t.adapter.queueFrameScripts(this,r,i),t.constructedKeyFrameIndex!=s){t.constructedKeyFrameIndex=s;var n=this.frame_command_indices[s],o=this.frame_recipe[s];1&o?t.adapter.removeAllTimelineChilds():2&o&&this.remove_childs_continous(t,n++),4&o&&this.add_childs_continous(t,n++),8&o&&this.update_childs(t,n++),16&o&&this.start_sounds(t,n++)}},t.prototype.remove_childs_continous=function(t,e){for(var i=this.command_index_stream[e],r=i+this.command_length_stream[e],s=i;s<r;s++)t.adapter.removeTimelineChildAt(this.remove_child_stream[s])},t.prototype.add_childs_continous=function(t,e){for(var i,r=this.command_index_stream[e],s=r+this.command_length_stream[e],n=r;n<s;n++)if(i=3*n,void 0!==this.add_child_stream[i]){var o=this.factory.createChildInstanceForTimeline(this,this.add_child_stream[i+2],this.add_child_stream[i]);t.adapter.addTimelineChildAtDepth(o,this.add_child_stream[i+1])}else console.warn("[Timeline] - add_childs_continous - could not find child-id in child_stream for idx",i,this.add_child_stream)},t.prototype.start_sounds=function(t,e){for(var i=this.command_index_stream[e],r=i+this.command_length_stream[e],s=i;s<r;s++){var n=this.audioPool[this.add_sounds_stream[s]];if(n){var o=n.sound;if(!o)return void console.warn("[Timeline] Missing sound in audioProps!",n);15==n.cmd?t.startSound(o,n.props.loopCount||0):16==n.cmd&&t.stopSound(o)}}},t.prototype.update_childs=function(e,i,r){for(var s=this.command_index_stream[i],n=s+this.command_length_stream[i],o=s;o<n;o++){var a=e.getTimelineChildAtSessionID(this.update_child_stream[o]);if(a){this._blocked=!(!a._adapter||!a.adapter.isBlockedByScript());for(var l=this.update_child_props_indices_stream[o],h=l+this.update_child_props_length_stream[o],c=l;c<h;c++)t.applyFunctionMap[this.property_type_stream[c]](this,a,e,this.property_index_stream[c])}}},t.update_mtx_all=function(t,e,i,r){if(!t._blocked&&!e.noTimelineUpdate){r*=6;var s=e.transform.matrix3D,n=t.properties_stream_f32_mtx_all;s._rawData[0]=n[r++],s._rawData[1]=n[r++],s._rawData[4]=n[r++],s._rawData[5]=n[r++],s._rawData[12]=n[r++],s._rawData[13]=n[r],e.transform.invalidateComponents()}},t.update_colortransform=function(t,i,r,s){if(!i._adapter||!i.adapter.isColorTransformByScript()){s*=8;var n=t.properties_stream_f32_ct,o=i.transform.colorTransform||(i.transform.colorTransform=new e.ColorTransform);o._rawData[0]=n[s++],o._rawData[1]=n[s++],o._rawData[2]=n[s++],o._rawData[3]=n[s++],o._rawData[4]=n[s++],o._rawData[5]=n[s++],o._rawData[6]=n[s++],o._rawData[7]=n[s],i.transform.invalidateColorTransform()}},t.update_masks=function(t,e,i,r){var s=[],n=t.properties_stream_int[r++];if(0!==n){for(var o=0;o<n;o++)s.push(i.getTimelineChildAtSessionID(t.properties_stream_int[r+o]));e.timelineMasks=s}else e.timelineMasks=void 0},t.update_name=function(t,e,i,r){0!=t.properties_stream_strings[r].indexOf("instance")&&(i.adapter.unregisterScriptObject(e),e.name=t.properties_stream_strings[r],i.adapter.registerScriptObject(e))},t.update_button_name=function(t,e,i,r){e.name=t.properties_stream_strings[r],e.addButtonListeners(),i.adapter.registerScriptObject(e)},t.update_visibility=function(t,e,i,r){e._adapter&&e.adapter.isVisibilityByScript()||(e.visible=!!r)},t.update_mtx_scale_rot=function(t,e,i,s){if(!t._blocked&&!e.noTimelineUpdate){s*=4;var n=e.transform.matrix3D,o=t.properties_stream_f32_mtx_scale_rot;n._rawData[0]=o[s++],n._rawData[1]=o[s++],n._rawData[4]=o[s++],n._rawData[5]=o[s],e.transform.invalidateComponents(),e._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)}},t.update_mtx_pos=function(t,e,i,r){if(!t._blocked&&!e.noTimelineUpdate){r*=2;var s=e.transform.matrix3D;s._rawData[12]=t.properties_stream_f32_mtx_pos[r++],s._rawData[13]=t.properties_stream_f32_mtx_pos[r],e.transform.invalidatePosition()}},t.enable_maskmode=function(t,e,i,r){e.maskMode=!0},t.remove_masks=function(t,e,i,r){e.timelineMasks=void 0},t.update_filters=function(t,e,i,r){var s=t.properties_stream_int[r++],n=t.properties_stream_int[r++],o=e.adapter;0!==n?o.updateFilters(t.properties_stream_filters.slice(s,s+n)):o.updateFilters(null)},t.swap_graphics=function(t,e,i,r){if(e.isAsset(y)){var s=e,n=t.graphicsPool[t.properties_stream_int[r]];n.id!==s.graphics.id&&(s.graphics=n)}else console.warn("[Timeline] - swap_graphics - child is not a Sprite")},t.start_audio=function(t,e,i,r){},t.set_ratio=function(t,e,i,r){e.isAsset(b)?e.setRatio(t.properties_stream_int[r]/65535):console.warn("[Timeline] - set_ratio - child is not a MorphSprite")},t.update_blendmode=function(t,e,i,r){var s;e.blendMode=(void 0===(s=r)&&(s=1),v[s]||v[1])},t.update_rendermode=function(t,e,i,r){console.log("update rendermode "+r)},t.prototype.dispose=function(){this.keyframe_indices=[],this.avm1Exports={},this.avm1InitActions={},this.avm1ButtonActions=[],this.graphicsPool={},this.audioPool={},this.placeObjectTagsForSessionIDs={},this._labels={},this._framescripts={},this._framescripts_translated={}},t.applyFunctionMap=((c={})[1]=t.update_mtx_all,c[2]=t.update_colortransform,c[3]=t.update_masks,c[4]=t.update_name,c[5]=t.update_button_name,c[6]=t.update_visibility,c[7]=t.update_blendmode,c[8]=t.update_rendermode,c[9]=t.update_filters,c[11]=t.update_mtx_scale_rot,c[12]=t.update_mtx_pos,c[200]=t.enable_maskmode,c[201]=t.remove_masks,c[202]=t.swap_graphics,c[203]=t.set_ratio,c[204]=t.start_audio,c),t}(),w=function(){function t(t){void 0===t&&(t=null),this._pAutoUpdate=!0,this.targetObject=t}return t.prototype.pNotifyUpdate=function(){this._pTargetObject&&this._pTargetObject._invalidateHierarchicalProperty(r.HierarchicalProperty.SCENE_TRANSFORM)},Object.defineProperty(t.prototype,"targetObject",{get:function(){return this._pTargetObject},set:function(t){this._pTargetObject!=t&&(this._pTargetObject&&this._pAutoUpdate&&(this._pTargetObject._iController=null),this._pTargetObject=t,this._pTargetObject&&this._pAutoUpdate&&(this._pTargetObject._iController=this),this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._pAutoUpdate},set:function(t){this._pAutoUpdate!=t&&(this._pAutoUpdate=t,this._pTargetObject&&(this._pAutoUpdate?this._pTargetObject._iController=this:this._pTargetObject._iController=null))},enumerable:!1,configurable:!0}),t.prototype.update=function(t){throw new e.AbstractMethodError},t.prototype.updateController=function(){this._pControllerDirty&&this._pAutoUpdate&&(this._pControllerDirty=!1,this.pNotifyUpdate())},t}(),E=function(t){function i(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i=0),void 0===r&&(r=90),void 0===s&&(s=-90),void 0===n&&(n=90),void 0===o&&(o=8),void 0===a&&(a=!1);var l=t.call(this,e)||this;return l._iCurrentPanAngle=0,l._iCurrentTiltAngle=90,l._panAngle=0,l._tiltAngle=90,l._minTiltAngle=-90,l._maxTiltAngle=90,l._steps=8,l._walkIncrement=0,l._strafeIncrement=0,l._wrapPanAngle=!1,l.fly=!1,l.panAngle=i,l.tiltAngle=r,l.minTiltAngle=s,l.maxTiltAngle=n,l.steps=o,l.wrapPanAngle=a,l._iCurrentPanAngle=l._panAngle,l._iCurrentTiltAngle=l._tiltAngle,l}return l(i,t),Object.defineProperty(i.prototype,"steps",{get:function(){return this._steps},set:function(t){t=t<1?1:t,this._steps!=t&&(this._steps=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"panAngle",{get:function(){return this._panAngle},set:function(t){this._panAngle!=t&&(this._panAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tiltAngle",{get:function(){return this._tiltAngle},set:function(t){t=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,t)),this._tiltAngle!=t&&(this._tiltAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minTiltAngle",{get:function(){return this._minTiltAngle},set:function(t){this._minTiltAngle!=t&&(this._minTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxTiltAngle",{get:function(){return this._maxTiltAngle},set:function(t){this._maxTiltAngle!=t&&(this._maxTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapPanAngle",{get:function(){return this._wrapPanAngle},set:function(t){this._wrapPanAngle!=t&&(this._wrapPanAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){if(void 0===t&&(t=!0),this._tiltAngle!=this._iCurrentTiltAngle||this._panAngle!=this._iCurrentPanAngle){if(this._pControllerDirty=!0,this._wrapPanAngle){for(this._panAngle<0?(this._iCurrentPanAngle+=this._panAngle%360+360-this._panAngle,this._panAngle=this._panAngle%360+360):(this._iCurrentPanAngle+=this._panAngle%360-this._panAngle,this._panAngle=this._panAngle%360);this._panAngle-this._iCurrentPanAngle<-180;)this._iCurrentPanAngle-=360;for(;this._panAngle-this._iCurrentPanAngle>180;)this._iCurrentPanAngle+=360}t?(this._iCurrentTiltAngle+=(this._tiltAngle-this._iCurrentTiltAngle)/(this.steps+1),this._iCurrentPanAngle+=(this._panAngle-this._iCurrentPanAngle)/(this.steps+1)):(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle),Math.abs(this.tiltAngle-this._iCurrentTiltAngle)<.01&&Math.abs(this._panAngle-this._iCurrentPanAngle)<.01&&(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle)}this.targetObject.rotationX=this._iCurrentTiltAngle,this.targetObject.rotationY=this._iCurrentPanAngle,this._walkIncrement&&(this.fly?this.targetObject.transform.moveForward(this._walkIncrement):(this.targetObject.x+=this._walkIncrement*Math.sin(this._panAngle*e.MathConsts.DEGREES_TO_RADIANS),this.targetObject.z+=this._walkIncrement*Math.cos(this._panAngle*e.MathConsts.DEGREES_TO_RADIANS)),this._walkIncrement=0),this._strafeIncrement&&(this.targetObject.transform.moveRight(this._strafeIncrement),this._strafeIncrement=0)},i.prototype.incrementWalk=function(t){0!=t&&(this._walkIncrement+=t,this.pNotifyUpdate())},i.prototype.incrementStrafe=function(t){0!=t&&(this._strafeIncrement+=t,this.pNotifyUpdate())},i}(w),A=function(t){function i(i,r){void 0===i&&(i=null),void 0===r&&(r=null);var s=t.call(this,i)||this;return s._pOrigin=new e.Vector3D(0,0,0),r?s.lookAtObject=r:s.lookAtPosition=new e.Vector3D,s}return l(i,t),Object.defineProperty(i.prototype,"lookAtPosition",{get:function(){return this._pLookAtPosition},set:function(t){this._pLookAtObject&&(this._pLookAtObject=null),this._pLookAtPosition=t,this.pNotifyUpdate()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"lookAtObject",{get:function(){return this._pLookAtObject},set:function(t){this._pLookAtPosition&&(this._pLookAtPosition=null),this._pLookAtObject!=t&&(this._pLookAtObject=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){this._pTargetObject&&(this._pLookAtPosition?this._pTargetObject.lookAt(this._pLookAtPosition):this._pLookAtObject&&this._pTargetObject.lookAt(this._pLookAtObject.transform.matrix3D.position))},i}(w),D=function(t){function i(i,r,s,n,o,a,l,h,c,u,p,d){void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=0),void 0===n&&(n=90),void 0===o&&(o=1e3),void 0===a&&(a=-90),void 0===l&&(l=90),void 0===h&&(h=null),void 0===c&&(c=null),void 0===u&&(u=8),void 0===p&&(p=2),void 0===d&&(d=!1);var _=t.call(this,i,r)||this;return _._iCurrentPanAngle=0,_._iCurrentTiltAngle=90,_._panAngle=0,_._tiltAngle=90,_._distance=1e3,_._minPanAngle=-1/0,_._maxPanAngle=1/0,_._minTiltAngle=-90,_._maxTiltAngle=90,_._steps=8,_._yFactor=2,_._wrapPanAngle=!1,_._upAxis=new e.Vector3D,_.distance=o,_.panAngle=s,_.tiltAngle=n,_.minPanAngle=null!=h?h:-1/0,_.maxPanAngle=null!=c?c:1/0,_.minTiltAngle=a,_.maxTiltAngle=l,_.steps=u,_.yFactor=p,_.wrapPanAngle=d,_._iCurrentPanAngle=_._panAngle,_._iCurrentTiltAngle=_._tiltAngle,_}return l(i,t),Object.defineProperty(i.prototype,"steps",{get:function(){return this._steps},set:function(t){t=t<1?1:t,this._steps!=t&&(this._steps=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"panAngle",{get:function(){return this._panAngle},set:function(t){t=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,t)),this._panAngle!=t&&(this._panAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tiltAngle",{get:function(){return this._tiltAngle},set:function(t){t=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,t)),this._tiltAngle!=t&&(this._tiltAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"distance",{get:function(){return this._distance},set:function(t){this._distance!=t&&(this._distance=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minPanAngle",{get:function(){return this._minPanAngle},set:function(t){this._minPanAngle!=t&&(this._minPanAngle=t,this.panAngle=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,this._panAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxPanAngle",{get:function(){return this._maxPanAngle},set:function(t){this._maxPanAngle!=t&&(this._maxPanAngle=t,this.panAngle=Math.max(this._minPanAngle,Math.min(this._maxPanAngle,this._panAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minTiltAngle",{get:function(){return this._minTiltAngle},set:function(t){this._minTiltAngle!=t&&(this._minTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxTiltAngle",{get:function(){return this._maxTiltAngle},set:function(t){this._maxTiltAngle!=t&&(this._maxTiltAngle=t,this.tiltAngle=Math.max(this._minTiltAngle,Math.min(this._maxTiltAngle,this._tiltAngle)))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"yFactor",{get:function(){return this._yFactor},set:function(t){this._yFactor!=t&&(this._yFactor=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapPanAngle",{get:function(){return this._wrapPanAngle},set:function(t){this._wrapPanAngle!=t&&(this._wrapPanAngle=t,this.pNotifyUpdate())},enumerable:!1,configurable:!0}),i.prototype.update=function(t){if(void 0===t&&(t=!0),this._tiltAngle!=this._iCurrentTiltAngle||this._panAngle!=this._iCurrentPanAngle){if(this._pControllerDirty=!0,this._wrapPanAngle){for(this._panAngle<0?(this._iCurrentPanAngle+=this._panAngle%360+360-this._panAngle,this._panAngle=this._panAngle%360+360):(this._iCurrentPanAngle+=this._panAngle%360-this._panAngle,this._panAngle=this._panAngle%360);this._panAngle-this._iCurrentPanAngle<-180;)this._iCurrentPanAngle-=360;for(;this._panAngle-this._iCurrentPanAngle>180;)this._iCurrentPanAngle+=360}t?(this._iCurrentTiltAngle+=(this._tiltAngle-this._iCurrentTiltAngle)/(this.steps+1),this._iCurrentPanAngle+=(this._panAngle-this._iCurrentPanAngle)/(this.steps+1)):(this._iCurrentPanAngle=this._panAngle,this._iCurrentTiltAngle=this._tiltAngle),Math.abs(this.tiltAngle-this._iCurrentTiltAngle)<.01&&Math.abs(this._panAngle-this._iCurrentPanAngle)<.01&&(this._iCurrentTiltAngle=this._tiltAngle,this._iCurrentPanAngle=this._panAngle)}var i=this.lookAtObject?this.lookAtObject.transform.position:this.lookAtPosition?this.lookAtPosition:this._pOrigin;this.targetObject.x=i.x+this.distance*Math.sin(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this.targetObject.y=i.y+this.distance*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS)*this.yFactor,this.targetObject.z=i.z+this.distance*Math.cos(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.x=-Math.sin(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.y=Math.cos(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._upAxis.z=-Math.cos(this._iCurrentPanAngle*e.MathConsts.DEGREES_TO_RADIANS)*Math.sin(this._iCurrentTiltAngle*e.MathConsts.DEGREES_TO_RADIANS),this._pTargetObject&&(this._pLookAtPosition?this._pTargetObject.lookAt(this._pLookAtPosition,this._upAxis):this._pLookAtObject&&this._pTargetObject.lookAt(this._pLookAtObject.transform.matrix3D.position,this._upAxis))},i}(A),T=function(t){function e(e,i,r,s){return void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=45),void 0===s&&(s=700),t.call(this,e,i,0,r,s)||this}return l(e,t),e.prototype.update=function(e){this.lookAtObject&&(this.panAngle=this._pLookAtObject.rotationY-180,t.prototype.update.call(this))},e}(D),S=function(t){function i(i,r,s,n,o){void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===n&&(n=40),void 0===o&&(o=4);var a=t.call(this,i,r)||this;return a.positionOffset=new e.Vector3D(0,500,-1e3),a.stiffness=s,a.damping=o,a.mass=n,a._velocity=new e.Vector3D,a._dv=new e.Vector3D,a._stretch=new e.Vector3D,a._force=new e.Vector3D,a._acceleration=new e.Vector3D,a._desiredPosition=new e.Vector3D,a}return l(i,t),i.prototype.update=function(e){if(this._pLookAtObject&&this._pTargetObject){this._pControllerDirty=!0;var i=this._pLookAtObject.transform.matrix3D.deltaTransformVector(this.positionOffset);this._desiredPosition.x=this._pLookAtObject.x+i.x,this._desiredPosition.y=this._pLookAtObject.y+i.y,this._desiredPosition.z=this._pLookAtObject.z+i.z,this._stretch=this._pTargetObject.transform.position.add(this._desiredPosition),this._stretch.scaleBy(-this.stiffness),this._dv.copyFrom(this._velocity),this._dv.scaleBy(this.damping),this._force.x=this._stretch.x-this._dv.x,this._force.y=this._stretch.y-this._dv.y,this._force.z=this._stretch.z-this._dv.z,this._acceleration.copyFrom(this._force),this._acceleration.scaleBy(1/this.mass),this._velocity.incrementBy(this._acceleration);var r=this._pTargetObject.transform.position.add(this._velocity);this._pTargetObject.transform.moveTo(r.x,r.y,r.z),t.prototype.update.call(this)}},i}(A),C=function(t){function r(e,r,s){void 0===s&&(s=!1);var o=t.call(this)||this;return o._pickObjects={},o.preserveDimensions=!1,o._onInvalidateTextureDelegate=function(t){return o._onInvalidateTexture(t)},o.style=new n.Style,o.style.sampler=new i.ImageSampler(!1,s,!1),o.material=e,o._updateDimensions(),o}return l(r,t),r.getNewBillboard=function(t,e,i){if(void 0===e&&(e="auto"),void 0===i&&(i=!1),r._billboards.length){var s=r._billboards.pop();return s.material=t,s}return new r(t,e,i)},Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardRect",{get:function(){return this._billboardRect},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardHeight",{get:function(){return this._billboardHeight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"billboardWidth",{get:function(){return this._billboardWidth},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"material",{get:function(){return this._material},set:function(t){t!=this._material&&(this._material&&this._material.removeEventListener(n.MaterialEvent.INVALIDATE_TEXTURES,this._onInvalidateTextureDelegate),this._material=t,this._material&&this._material.addEventListener(n.MaterialEvent.INVALIDATE_TEXTURES,this._onInvalidateTextureDelegate),this._updateDimensions(),this._invalidateMaterial())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this._width},set:function(t){this._width!=t&&(this._width=t,this.scaleX=this._width/this._billboardRect.width)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},set:function(t){this._height!=t&&(this._height=t,this.scaleY=this._height/this._billboardRect.height)},enumerable:!1,configurable:!0}),r.prototype.invalidateElements=function(){for(var e in this._pickObjects)this._pickObjects[e]._onInvalidateElements();t.prototype.invalidateElements.call(this)},r.prototype.advanceFrame=function(){},r.prototype.getEntity=function(){return this},r.prototype.dispose=function(){this.disposeValues(),r._billboards.push(this)},r.prototype.clone=function(){var t=r.getNewBillboard(this._material);return this.copyTo(t),t},r.prototype._acceptTraverser=function(t){if(this.material&&this.material.getTextureAt(0)){var e=this.image;e&&!e.isDisposed&&t.applyTraversable(this)}},Object.defineProperty(r.prototype,"image",{get:function(){var t,e;if(!this.material)return null;var i=this.material.getTextureAt(0);if(!i)return null;var r=null===(t=this._style)||void 0===t?void 0:t.getImageAt(i);return r||((r=null===(e=this.material.style)||void 0===e?void 0:e.getImageAt(i))||i.getImageAt(0))},enumerable:!1,configurable:!0}),r.prototype._updateDimensions=function(){var t=this.image;if(t&&!t.isDisposed){var i=this.style.sampler;i.imageRect?(this._billboardWidth=i.imageRect.width*t.width,this._billboardHeight=i.imageRect.height*t.height):(this._billboardWidth=t.rect.width,this._billboardHeight=t.rect.height),this._billboardRect=i.frameRect||new e.Rectangle(0,0,this._billboardWidth,this._billboardHeight)}else this._billboardWidth=1,this._billboardHeight=1,this._billboardRect=new e.Rectangle(0,0,1,1);this.invalidate(),this.invalidateElements(),this.preserveDimensions?(this.scaleX=this._width/this._billboardRect.width,this.scaleY=this._height/this._billboardRect.height):(this._width=this._billboardRect.width*this.scaleX,this._height=this._billboardRect.height*this.scaleY)},r.prototype._onInvalidateProperties=function(e){void 0===e&&(e=null),t.prototype._onInvalidateProperties.call(this,e),this._updateDimensions()},r.prototype._onInvalidateTexture=function(t){this._updateDimensions()},r._billboards=new Array,r.assetType="[asset Billboard]",r}(m),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=this.renderable,r=t.billboardWidth,s=t.billboardHeight,o=t.billboardRect,a=r.toString()+s.toString()+o.toString();this._id=a;var l=e._samplerElements[a];if(!l){var h=-o.x,c=-o.y,u=r-o.x,p=s-o.y;(l=e._samplerElements[a]=new n.TriangleElements(new i.AttributesBuffer(11,4))).autoDeriveNormals=!1,l.autoDeriveTangents=!1,l.setPositions([h,c,0,u,p,0,u,c,0,h,c,0,h,p,0,u,p,0]),l.setUVs([0,0,1,1,1,0,0,0,0,1,1,1])}return this._stage.abstractions.getAbstraction(l)},e.prototype.draw=function(){this._stage.context.setCulling(i.ContextGLTriangleFace.NONE),t.prototype.draw.call(this)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable.material||n.MaterialUtils.getDefaultColorMaterial())},e.prototype._getStyle=function(){return this.renderable.style},e._samplerElements=new Object,e}(n._Render_RenderableBase),I=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.hitTestPoint=function(t,e,i){return!0},i.prototype.getBoxBounds=function(t,i,r,s){if(void 0===t&&(t=null),void 0===r&&(r=null),void 0===s&&(s=null),this._orientedBoxBoundsDirty){this._orientedBoxBoundsDirty=!1;var n=this.pickable.billboardRect;this._orientedBoxBounds=new e.Box(n.x,n.y,0,n.width,n.height,0)}return(t?t.transformBox(this._orientedBoxBounds):this._orientedBoxBounds).union(s,s||r)},i.prototype.getSphereBounds=function(t,e,i,r,s){return void 0===s&&(s=null),s},i.prototype.testCollision=function(t,i){var r=-t.rayPosition.z/t.rayDirection.z,s=new e.Vector3D(t.rayPosition.x+r*t.rayDirection.x,t.rayPosition.y+r*t.rayDirection.y);return t.pickable=this.pickable,t.rayEntryDistance=r,t.position=s,t.normal=new e.Vector3D(0,0,1),!0},i}(r._Pick_PickableBase);n.RenderEntity.registerRenderable(P,C),r.PickEntity.registerPickable(I,C);var O=function(t){function e(e,i){var r=t.call(this,e)||this;return r._camera=i,r}return l(e,t),Object.defineProperty(e.prototype,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._camera)},e.PROJECTION_CHANGED="projectionChanged",e}(e.EventBase),N=function(t){function i(i){void 0===i&&(i=null);var r=t.call(this)||this;return r._projection=i||new e.PerspectiveProjection,r._projection.transform=r._transform,r.z=-1e3,r}return l(i,t),Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"projection",{get:function(){return this._projection},set:function(t){if(this._projection!=t){if(!t)throw new Error("Projection cannot be null!");this._projection.transform=null,this._projection=t,this._projection.transform=this._transform,this.dispatchEvent(new O(O.PROJECTION_CHANGED,this))}},enumerable:!1,configurable:!0}),i.prototype.project=function(t,e){return void 0===e&&(e=null),this._projection.project(this._transform.inverseMatrix3D.transformVector(t,e),e)},i.prototype.unproject=function(t,e,i,r){return void 0===r&&(r=null),this._transform.matrix3D.transformVector(this._projection.unproject(t,e,i,r))},i.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.NULL},i.assetType="[asset Camera]",i}(m),L=function(t){function e(e,i,r,s){void 0===s&&(s=1);var n=t.call(this)||this;return n._pickObjects={},n.material=e,n._startPosition=i,n._endPosition=r,n._halfThickness=.5*s,n}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPosition",{get:function(){return this._startPosition},set:function(t){this._startPosition!=t&&(this._startPosition=t,this.invalidateElements())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){return this._endPosition},set:function(t){this._endPosition!=t&&(this._endPosition=t,this.invalidateElements())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return 2*this._halfThickness},set:function(t){this._halfThickness!=t&&(this._halfThickness=.5*t,this.invalidateElements())},enumerable:!1,configurable:!0}),e.prototype.invalidateElements=function(){for(var e in this._pickObjects)this._pickObjects[e]._onInvalidateElements();t.prototype.invalidateElements.call(this)},e.prototype.getEntity=function(){return this},e.prototype._acceptTraverser=function(t){t.applyTraversable(this)},e.assetType="[asset LineSegment]",e}(g),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=this.renderable,i=e._lineGraphics[t.id]||(e._lineGraphics[t.id]=new n.LineElements),r=t.startPosition,s=t.endPosition,o=new Float32Array(6),a=new Float32Array(1);return o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=s.x,o[4]=s.y,o[5]=s.z,a[0]=t.thickness,i.setPositions(o),i.setThickness(a),this._stage.abstractions.getAbstraction(i)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable.material||n.MaterialUtils.getDefaultColorMaterial())},e.prototype._getStyle=function(){return this.renderable.style},e._lineGraphics={},e}(n._Render_RenderableBase),F=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.hitTestPoint=function(t,e,i){return!0},i.prototype.getBoxBounds=function(t,i,r,s){if(void 0===t&&(t=null),void 0===r&&(r=null),void 0===s&&(s=null),this._orientedBoxBoundsDirty){this._orientedBoxBoundsDirty=!1;var n=this.pickable,o=n.startPosition,a=n.endPosition;this._orientedBoxBounds=new e.Box(Math.min(o.x,a.x),Math.min(o.y,a.y),Math.min(o.z,a.z),Math.abs(o.x-a.x),Math.abs(o.y-a.y),Math.abs(o.z-a.z))}return(t?t.transformBox(this._orientedBoxBounds):this._orientedBoxBounds).union(s,s||r)},i.prototype.getSphereBounds=function(t,i,r,s,n){if(void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=null),this._orientedSphereBoundsDirty){this._orientedSphereBoundsDirty=!1;var o=this.pickable,a=o.startPosition,l=o.endPosition,h=(l.x-a.x)/2,c=(l.y-a.y)/2,u=(l.z-a.z)/2;this._orientedSphereBounds=new e.Sphere(a.x+h,a.y+c,a.z+u,Math.sqrt(h*h+c*c+u*u))}return(i?i.transformSphere(this._orientedSphereBounds):this._orientedSphereBounds).union(n,n||s)},i.prototype.testCollision=function(t,e){return t.pickable=null,!1},i}(r._Pick_PickableBase);n.RenderEntity.registerRenderable(M,L),r.PickEntity.registerPickable(F,L);var k=function(t){function i(i,r){var s;void 0===i&&(i=!0),void 0===r&&(r=null);var n=t.call(this)||this;return n._useAssetLib=i,n._assetLibId=r,n._onLoaderStartDelegate=function(t){return n._onLoaderStart(t)},n._onLoadProgressDelegate=function(t){return n._onLoadProgress(t)},n._onLoadCompleteDelegate=function(t){return n._onLoadComplete(t)},n._onAssetCompleteDelegate=function(t){return n._onAssetComplete(t)},n._onLoaderCompleteDelegate=function(t){return n._onLoaderComplete(t)},n._onLoadErrorDelegate=function(t){return n._onLoadError(t)},n._onParseErrorDelegate=function(t){return n._onParseError(t)},n._errorDelegateSelector=((s={})[e.URLLoaderEvent.LOAD_ERROR]=n._onLoadErrorDelegate,s[e.ParserEvent.PARSE_ERROR]=n._onParseErrorDelegate,s),n}return l(i,t),Object.defineProperty(i.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"contentLoader",{get:function(){return this._contentLoader},enumerable:!1,configurable:!0}),i.prototype.addEventListener=function(i,r){(this._contentLoader&&i==e.URLLoaderEvent.LOAD_ERROR||i==e.ParserEvent.PARSE_ERROR)&&this._contentLoader.addEventListener(i,this._errorDelegateSelector[i]),t.prototype.addEventListener.call(this,i,r)},i.prototype.removeEventListener=function(i,r){(this._contentLoader&&i==e.URLLoaderEvent.LOAD_ERROR||i==e.ParserEvent.PARSE_ERROR)&&this._contentLoader.removeEventListener(i,this._errorDelegateSelector[i]),t.prototype.removeEventListener.call(this,i,r)},i.prototype.close=function(){this._contentLoader&&(this._useAssetLib&&e.AssetLibraryBundle.getInstance(this._assetLibId).stopLoader(this._contentLoader),this._disposeLoader())},i.prototype.load=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this._getLoader().load(t,e,i,r)},i.prototype.loadData=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this._getLoader().loadData(t,"",e,i,r)},i.prototype._getLoader=function(){return this._contentLoader&&this.close(),this._contentLoader=this._useAssetLib?e.AssetLibraryBundle.getInstance(this._assetLibId).getLoader():new e.Loader,this._contentLoader.addEventListener(e.LoaderEvent.LOADER_START,this._onLoaderStartDelegate),this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_PROGRESS,this._onLoadProgressDelegate),this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_COMPLETE,this._onLoadCompleteDelegate),this._contentLoader.addEventListener(e.AssetEvent.ASSET_COMPLETE,this._onAssetCompleteDelegate),this._contentLoader.addEventListener(e.LoaderEvent.LOADER_COMPLETE,this._onLoaderCompleteDelegate),this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&this._contentLoader.addEventListener(e.URLLoaderEvent.LOAD_ERROR,this._onLoadErrorDelegate),this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&this._contentLoader.addEventListener(e.ParserEvent.PARSE_ERROR,this._onParseErrorDelegate),this._contentLoader},i.prototype._disposeLoader=function(){this._contentLoader.removeEventListener(e.LoaderEvent.LOADER_START,this._onLoaderStartDelegate),this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_PROGRESS,this._onLoadProgressDelegate),this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_COMPLETE,this._onLoadCompleteDelegate),this._contentLoader.removeEventListener(e.AssetEvent.ASSET_COMPLETE,this._onAssetCompleteDelegate),this._contentLoader.removeEventListener(e.LoaderEvent.LOADER_COMPLETE,this._onLoaderCompleteDelegate),this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&this._contentLoader.removeEventListener(e.URLLoaderEvent.LOAD_ERROR,this._onLoadErrorDelegate),this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&this._contentLoader.removeEventListener(e.ParserEvent.PARSE_ERROR,this._onParseErrorDelegate),this._useAssetLib||this._contentLoader.stop(),this._contentLoader=null},i.prototype.unload=function(){},i.enableParser=function(t){e.Loader.enableParser(t)},i.enableParsers=function(t){e.Loader.enableParsers(t)},i.prototype._onLoaderStart=function(t){this.dispatchEvent(t)},i.prototype._onLoadProgress=function(t){this.dispatchEvent(t)},i.prototype._onLoadComplete=function(t){this.dispatchEvent(t)},i.prototype._onAssetComplete=function(t){this.dispatchEvent(t)},i.prototype._onLoadError=function(t){return!!this.hasEventListener(e.URLLoaderEvent.LOAD_ERROR)&&(this.dispatchEvent(t),!0)},i.prototype._onParseError=function(t){return!!this.hasEventListener(e.ParserEvent.PARSE_ERROR)&&(this.dispatchEvent(t),!0)},i.prototype._onLoaderComplete=function(t){this._content=t.content,this._content&&this.addChild(this._content),this.dispatchEvent(t),this._disposeLoader()},i}(m),R=function(){function t(){}return t.setInterval=function(t,e,i){return void 0===i&&(i=!1),this._intervalID++,e<1&&(e=1),this._active_intervals.push({id:this._intervalID,f:t,t:e,dt:0,isTimeout:i,isActive:!0}),this._intervalID},t.setTimeOut=function(t,e){return this.setInterval(t,e,!0)},t.clearInterval=function(t){for(var e=this._active_intervals.length;e--;)if(this._active_intervals[e].id==t){this._active_intervals[e].isActive=!1,this._active_intervals.splice(e,1),this._index>e&&this._index--;break}},t.clearTimeout=function(t){this.clearInterval(t)},t.execute_intervals=function(t){var e;for(void 0===t&&(t=0),this._index=this._active_intervals.length;this._index--;)for((e=this._active_intervals[this._index]).dt+=t;e.isActive&&e.dt>=e.t;)e.isTimeout&&(e.isActive=!1,this._active_intervals.splice(this._index,1)),e.dt-=e.t,e.f()},t.add_child_to_dispose=function(t){this._queued_dispose.push(t)},t.get_queue=function(){return t._queue||(t._queue={queued_mcs:[],queued_scripts:[],queued_mcs_pass2:[],queued_scripts_pass2:[],constructors:[]}),t._queue},t.add_script_to_queue=function(e,i){var r=t.get_queue(),s=r.queued_mcs_pass2.length,n=0;for(n=0;n<s;n++)r.queued_mcs.push(r.queued_mcs_pass2[n]),r.queued_scripts.push(r.queued_scripts_pass2[n]);r.queued_mcs_pass2.length=0,r.queued_scripts_pass2.length=0,e.adapter.allowScript=!0,r.queued_mcs.push(e),r.queued_scripts.push(i)},t.add_loaded_action_to_queue=function(e){var i=t.get_queue();i.queued_mcs.push(e),i.queued_scripts.push(null)},t.add_script_to_queue_pass2=function(e,i){var r=t.get_queue();e.adapter.allowScript=!0,r.queued_mcs_pass2.push(e),r.queued_scripts_pass2.push(i)},t.execute_as3_constructors_finish_scene=function(e){for(var i=0,r=e.numChildren;i<r;i++){var s=e.getChildAt(i);s.parent&&s.adapter.executeConstructor&&t.execute_as3_constructors_recursiv(s)}},t.execute_as3_constructors_enterFrame=function(e){t.invalidAS3Constructors&&(t.execute_as3_constructors_recursiv(e),t.invalidAS3Constructors=!1)},t.execute_as3_constructors_recursiv=function(e){var i=e.adapter,r=i.executeConstructor;if(r)i.executeConstructor=null,r();else for(var s=0,n=e.numChildren;s<n;s++){var o=e.getChildAt(s);t.execute_as3_constructors_recursiv(o)}e.just_added_to_timeline&&e._sessionID>=0&&i&&i.dispatchStaticEvent&&(e.just_added_to_timeline=!1,i.dispatchStaticEvent("added",i),e.hasDispatchedAddedToStage=e.isOnDisplayList(),e.hasDispatchedAddedToStage&&i.dispatchStaticEvent("addedToStage",i))},t.isOnStage=function(t){for(var e=t;e&&!e.isAVMScene;)e=e.parent;return!(!e||!e.isAVMScene)},t.execute_avm1_constructors=function(){var e=t.get_queue();if(0!=e.queued_mcs.length||0!=e.queued_mcs_pass2.length){for(var i=e.queued_mcs_pass2.length;i>0;)i--,e.queued_mcs.push(e.queued_mcs_pass2[i]),e.queued_scripts.push(e.queued_scripts_pass2[i]);e.queued_mcs_pass2.length=0,e.queued_scripts_pass2.length=0;var r,s=e.queued_mcs;if(t.useAVM1){for(i=s.length;i>0;)if(r=s[--i],t.isOnStage(r)&&r.onInitialize){var n=r.onInitialize;r.onInitialize=null,n()}for(i=0;i<s.length;i++)if(r=s[i],t.isOnStage(r)){if(r.onConstruct){n=r.onConstruct;r.onConstruct=null,n()}var o=r.adapter.executeConstructor;o&&(r.adapter.executeConstructor=null,o())}}}},t.execute_queue=function(){var e=t.get_queue();if(0!=e.queued_mcs.length||0!=e.queued_mcs_pass2.length){var i=e.queued_mcs.concat(),r=e.queued_scripts.concat();e.queued_mcs.length=0,e.queued_scripts.length=0;var s,n=e.queued_mcs_pass2.length,o=0;for(o=0;o<n;o++)i.push(e.queued_mcs_pass2[o]),r.push(e.queued_scripts_pass2[o]);if(e.queued_mcs_pass2.length=0,e.queued_scripts_pass2.length=0,t.useAVM1){for(o=0;o<i.length;o++)if(s=i[o],t.isOnStage(s)&&s.onInitialize){var a=s.onInitialize;s.onInitialize=null,a()}for(o=0;o<i.length;o++)if(s=i[o],t.isOnStage(s)){if(s.onConstruct){a=s.onConstruct;s.onConstruct=null,a()}var l=s.adapter.executeConstructor;l&&(s.adapter.executeConstructor=null,l())}}for(o=0;o<i.length;o++){if(s=i[o],t.useAVM1){if(!t.isOnStage(s))continue;if(s.onLoaded){a=s.onLoaded;s.onLoaded=null,a()}if(!s.adapter.hasOnLoadExecuted){s.adapter.hasOnLoadExecuted=!0;var h=s.adapter.alGet("onLoad");h&&h.alCall(s.adapter)}}null!=r[o]&&((s=i[o])&&s.adapter&&!s.adapter.constructorHasRun?(e.queued_mcs.push(s),e.queued_scripts.push(r[o])):s&&s.adapter&&s.adapter.executeScript&&s.adapter.executeScript(r[o]))}}},t.execute_dispose=function(){for(var t=this._queued_dispose.length,e=0;e<t;e++)this._queued_dispose[e].dispose();this._queued_dispose.length=0},t.invalidAS3Constructors=!1,t.frameScriptDebug=void 0,t.useAVM1=!1,t._queued_dispose=[],t._active_intervals=[],t._index=0,t._intervalID=0,t}(),B=function(t){function e(e){return t.call(this,e)||this}return l(e,t),Object.defineProperty(e.prototype,"bubbles",{get:function(){var t=this._iAllowedToPropagate&&this._iAllowedToImmediatlyPropagate;return this._iAllowedToPropagate=!0,this._iAllowedToImmediatlyPropagate=!0,t},enumerable:!1,configurable:!0}),e.prototype.stopPropagation=function(){this._iAllowedToPropagate=!1,this._iParentEvent&&this._iParentEvent.stopPropagation()},e.prototype.stopImmediatePropagation=function(){this._iAllowedToPropagate=!1,this._iAllowedToImmediatlyPropagate=!1,this._iParentEvent&&this._iParentEvent.stopImmediatePropagation()},Object.defineProperty(e.prototype,"scenePosition",{get:function(){return this.containerNode.getMatrix3D().transformVector(this.position)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sceneNormal",{get:function(){var t=this.containerNode.getMatrix3D().deltaTransformVector(this.normal);return t.normalize(),t},enumerable:!1,configurable:!0}),e.prototype._dispatchEvent=function(t,e){},e}(e.EventBase),q=function(t){function e(e){var i=t.call(this,e)||this;return i.buttons=0,i}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.screenX=this.screenX,t.screenY=this.screenY,t.view=this.view,t.containerNode=this.containerNode,t.rootNode=this.rootNode,t.pickable=this.pickable,t.material=this.material,t.uv=this.uv,t.position=this.position,t.normal=this.normal,t.elementIndex=this.elementIndex,t.delta=this.delta,t.ctrlKey=this.ctrlKey,t.shiftKey=this.shiftKey,t._iParentEvent=this,t._iAllowedToPropagate=this._iAllowedToPropagate,t.buttons=this.buttons,t},e.prototype._dispatchEvent=function(t,i){t.isMouseDisabled()&&this.type!=e.MOUSE_OUT&&this.type!=e.ROLL_OUT||(t.container.dispatchEvent(this,i),R.execute_queue())},e.MOUSE_OVER="mouseOver3d",e.MOUSE_OUT="mouseOut3d",e.ROLL_OVER="rollOver3d",e.ROLL_OUT="rollOut3d",e.MOUSE_UP="mouseUp3d",e.MOUSE_UP_OUTSIDE="mouseUpOutside3d",e.MOUSE_DOWN="mouseDown3d",e.MOUSE_MOVE="mouseMove3d",e.DRAG_MOVE="dragMove3d",e.DRAG_OUT="dragOut3d",e.DRAG_OVER="dragOver3d",e.DRAG_START="dragStart3d",e.DRAG_STOP="dragStop3d",e.CLICK="click3d",e.DOUBLE_CLICK="doubleClick3d",e.MOUSE_WHEEL="mouseWheel3d",e}(B),U=function(t){function i(e,i){void 0===i&&(i=!1);var r=t.call(this)||this;return r.symbolID=0,r.preventScript=!1,r._scenes=[],r._buttonMode=!1,r._isButton=!1,r._time=0,r._currentFrameIndex=-1,r._isPlaying=!0,r._currentSceneIndex=0,r._sceneDirty=!1,r._isInit=!0,r._sessionID_childs={},r._sounds={},r._skipFramesForStream=0,r._isTimelinePass=!1,r._isSprite=!1,r.buttonEnabled=!0,r.loop=!0,r.constructedKeyFrameIndex=-1,r._soundVolume=1,r._isButton=!1,r._buttonMode=!1,r._useHandCursor=!0,r.doingSwap=!1,r.cursorType="pointer",r._onMouseOver=function(t){r.buttonEnabled?r.currentFrameIndex=1&t.buttons?0==r.currentFrameIndex?0:2:1:r.currentFrameIndex=0},r._onMouseOut=function(t){r.currentFrameIndex=1&t.buttons&&0!=r.currentFrameIndex?1:0},r._onMouseDown=function(t){r.buttonEnabled?r.currentFrameIndex=2:r.currentFrameIndex=0},r._onMouseUp=function(t){r.currentFrameIndex=1},r._onMouseUpOutside=function(t){r.currentFrameIndex=0},r._timeline=e,i&&r.transformToSprite(),r._onChannelCompleteStopError=r._onChannelCompleteStopError.bind(r),r}return l(i,t),i.stopSounds=function(t){if(t)i._activeSounds[t.id]&&i._activeSounds[t.id].stop();else for(var e in i._activeSounds)i._activeSounds[e].stop()},i.getNewMovieClip=function(t){if(i._movieClips.length){var e=i._movieClips.pop();return e.timeline=t,e}return new i(t)},i.clearPool=function(){i._movieClips=[]},Object.defineProperty(i.prototype,"isSprite",{get:function(){return this._isSprite},enumerable:!1,configurable:!0}),i.prototype.initSoundStream=function(t,e){this._soundStreams||(this._soundStreams=new i.movieClipSoundsManagerClass(this)),this._soundStreams.initSoundStream(t,e)},i.prototype.addSoundStreamBlock=function(t,e){this._soundStreams||(this._soundStreams=new i.movieClipSoundsManagerClass(this)),this._soundStreams.addSoundStreamBlock(t,e)},i.prototype.stopCurrentStream=function(t){if(this._soundStreams)return this._soundStreams.stopStream(t)},i.prototype.resetStreamStopped=function(){this._soundStreams&&this._soundStreams.resetStreamStopped()},i.prototype._syncSounds=function(t){return this._soundStreams?this._soundStreams.syncSounds(t,this._isPlaying,this.parent):0},i.prototype.transformToSprite=function(){if(!this._isSprite){this._isSprite=!0;var t=this._timeline;t.numFrames<=1||(t.frame_command_indices=[t.frame_command_indices[0]],t.frame_recipe=[t.frame_recipe[0]],t.keyframe_constructframes=[t.keyframe_constructframes[0]],t.keyframe_durations=[t.keyframe_durations[0]],t.keyframe_firstframes=[t.keyframe_firstframes[0]],t.keyframe_indices=[t.keyframe_indices[0]])}},i.prototype.startSound=function(t,r,s){var n=t.play(0,r);n.volume=this._soundVolume,s&&n.addEventListener(e.BaseAudioChannel.COMPLETE,s),n.addEventListener(e.BaseAudioChannel.COMPLETE,this._onChannelCompleteStopError),n.addEventListener(e.BaseAudioChannel.STOP,this._onChannelCompleteStopError),n.addEventListener(e.BaseAudioChannel.ERROR,this._onChannelCompleteStopError);var o=t.id;this._sounds[o]||(this._sounds[o]=[]),this._sounds[o].push(n),i._activeSounds[o]=t},i.prototype.stopSounds=function(t){if(void 0===t&&(t=null),t)this._sounds[t.id]&&this._stopChannels(t);else for(var e in this._sounds)for(var r=0,s=this._sounds[e];r<s.length;r++){s[r].stop()}for(var n,o=this._children.length,a=0;a<o;++a)(n=this._children[a]).isAsset(i)&&n.stopSounds(t);this.stopCurrentStream(this._currentFrameIndex),this._soundStreams&&this._soundStreams.syncSounds(0,!1,this.parent)},i.prototype.getSceneIndexByFrame=function(t){var e=this.scenes;if(e.length<=1)return 0;for(var i=0;i<e.length;i++)if(e[i].offset>t)return i-1;return e.length-1},i.prototype.getSceneIndex=function(t){for(var e=this.scenes,i=0;i<e.length&&t;i++)if(e[i].name===t)return i;return 0},Object.defineProperty(i.prototype,"currentSceneName",{get:function(){return this.scenes[this._currentSceneIndex].name},set:function(t){var e=this.getSceneIndex(t);this._sceneDirty=this._currentSceneIndex!==e,this._currentSceneIndex=e,this._currentFrameIndex=this._scenes[e].offset},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentScene",{get:function(){var t=this.scenes[this._currentSceneIndex];return-1===t.numFrames&&(t.numFrames=this.timeline.numFrames-t.offset),t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"scenes",{get:function(){return 0===this._scenes.length&&(this._scenes[0]={name:"Scene1",offset:0,labels:[],numFrames:this.timeline.numFrames}),this._scenes},set:function(t){this._scenes=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"soundVolume",{get:function(){return this._soundVolume},set:function(t){var e;if(this._soundVolume!=t)for(var i in this._soundVolume=t,this._sounds)if(e=this._sounds[i])for(var r=0,s=e;r<s.length;r++){s[r].volume=t}},enumerable:!1,configurable:!0}),i.prototype.stopSound=function(t){i.stopSounds(t)},i.prototype.buttonReset=function(){this._isButton&&!this.buttonEnabled&&(this.currentFrameIndex=0)},i.prototype.getMouseCursor=function(){return"scene"==this.name?"initial":this._useHandCursor&&this.buttonMode?this.cursorType:"initial"},i.prototype.queueFrameScripts=function(t,e,i){console.warn("[MovieClip] - queueFrameScripts should only be called on AVM-Adapters")},i.prototype.registerScriptObject=function(t){this[t.name]=t,t.isAsset(i)&&t.removeButtonListeners()},i.prototype.unregisterScriptObject=function(t){delete this[t.name],t.isAsset(i)&&t.removeButtonListeners()},i.prototype.dispose=function(){this.disposeValues(),i._movieClips.push(this)},i.prototype.disposeValues=function(){t.prototype.disposeValues.call(this),this._sessionID_childs={},this._timeline=null},Object.defineProperty(i.prototype,"useHandCursor",{get:function(){return this._useHandCursor},set:function(t){this._useHandCursor=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buttonMode",{get:function(){return this._buttonMode},set:function(t){this._buttonMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isButton",{get:function(){return this._isButton},set:function(t){this._isButton=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isInit",{get:function(){return this._isInit},set:function(t){this._isInit=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"timeline",{get:function(){return this._timeline},set:function(t){this._timeline!=t&&(this._timeline=t,this.reset(!1,!1))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"numFrames",{get:function(){return this._timeline.numFrames},enumerable:!1,configurable:!0}),i.prototype.jumpToLabel=function(t,e){void 0===e&&(e=0);var i=this._currentFrameIndex;return this._timeline.jumpToLabel(this,t,e),i!==this._currentFrameIndex},i.prototype.reset=function(e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this._isTimelinePass=!0,i&&t.prototype.reset.call(this),this.resetStreamStopped(),this._time=0,i&&this._adapter&&this.adapter.freeFromScript(),this.constructedKeyFrameIndex=-1;for(var r=this.numChildren-1;r>=0;r--)this.removeChildAt(r);if(this._graphics&&this._graphics.clear(),e){var s=this._timeline.keyframe_indices.length;this._isPlaying=Boolean(s>1),this._currentSceneIndex=0,s?(this._currentFrameIndex=0,this._timeline.constructNextFrame(this,e&&!this.doingSwap&&!this.preventScript,!0)):this._currentFrameIndex=-1}this._skipAdvance=!0,this._isTimelinePass=!1},Object.defineProperty(i.prototype,"currentFrameIndex",{get:function(){return this._currentFrameIndex},set:function(t){this.jumpToIndex(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentFrameIndexRelative",{get:function(){return this._currentFrameIndex-this.currentScene.offset},set:function(t){this.jumpToIndex(t,this._currentSceneIndex)},enumerable:!1,configurable:!0}),i.prototype.jumpToIndex=function(t,e){var i=!0,r=0,s=this._timeline.keyframe_indices.length;if(this.resetStreamStopped(),!s)return!1;var n=this.scenes;if(void 0===e)e=this.getSceneIndexByFrame(t);else{var o=n[e="string"==typeof e?this.getSceneIndex(e):e];-1===o.numFrames&&(o.numFrames=s-o.offset),r=o.offset,s=o.numFrames}return this._currentSceneIndex=e,t<0?t=0:t>=s&&(t=s-1,i=!1),t+=r,this._skipAdvance=!1,!(this._currentFrameIndex===t&&!this._sceneDirty)&&(this._sceneDirty=!1,this._currentFrameIndex=t,this._isTimelinePass=!0,this._timeline.gotoFrame(this,t,i,!1,!1),this._isTimelinePass=!1,!0)},i.prototype.addButtonListeners=function(){this._isButton=!0,this.stop(),this.addEventListener(q.MOUSE_OVER,this._onMouseOver),this.addEventListener(q.MOUSE_OUT,this._onMouseOut),this.addEventListener(q.MOUSE_DOWN,this._onMouseDown),this.addEventListener(q.MOUSE_UP,this._onMouseUp),this.addEventListener(q.MOUSE_UP_OUTSIDE,this._onMouseUpOutside),this.mouseChildren=!1},i.prototype.removeButtonListeners=function(){this.removeEventListener(q.MOUSE_OVER,this._onMouseOver),this.removeEventListener(q.MOUSE_OUT,this._onMouseOut),this.removeEventListener(q.MOUSE_DOWN,this._onMouseDown),this.removeEventListener(q.MOUSE_UP,this._onMouseUp),this.removeEventListener(q.MOUSE_UP_OUTSIDE,this._onMouseUpOutside)},i.prototype.getTimelineChildAtSessionID=function(t){return this._sessionID_childs[t]},i.prototype.constructFrame=function(t,e,i,r,s,n,o){console.warn("[scene/MovieClip] - constructFrame not implemented")},i.prototype.addTimelineChildAtDepth=function(t,e,i){return console.warn("[scene/MovieClip] - addTimelineChildAtDepth not implemented"),null},i.prototype.removeTimelineChildAtDepth=function(t){console.warn("[scene/MovieClip] - removeTimelineChildAtDepth not implemented")},i.prototype.removeChildAtInternal=function(e){var i=this._children[e];return i._adapter&&i.adapter.freeFromScript(),this._isTimelinePass&&this.adapter.unregisterScriptObject(i),delete this._sessionID_childs[i._sessionID],i._sessionID=-1,t.prototype.removeChildAtInternal.call(this,e)},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.prototype.play=function(){this._timeline.keyframe_indices.length>1&&(this._isPlaying=!0)},i.prototype.stop=function(){this.resetStreamStopped(),this._isPlaying=!1},i.prototype.clone=function(){var t=i.getNewMovieClip(this._timeline);return this.copyTo(t),t},i.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.buttonMode=this.buttonMode,e.symbolID=this.symbolID,e.loop=this.loop,e._soundStreams=this._soundStreams,e._scenes=this._scenes,this._isSprite&&e.transformToSprite()},i.prototype.advanceFrameInternal=function(){this._timeline&&this._timeline.numFrames>0&&this._isPlaying&&!this._skipAdvance&&(this._currentFrameIndex===this._timeline.numFrames-1?this.loop?0!==this._currentFrameIndex&&(this._currentFrameIndex=0,this._currentSceneIndex=0,this.resetStreamStopped(),this._timeline.gotoFrame(this,0,!0,!0,!0)):this._isPlaying=!1:(this._currentFrameIndex++,this._currentSceneIndex=this.getSceneIndexByFrame(this._currentFrameIndex),this._timeline.constructNextFrame(this))),t.prototype.advanceFrame.call(this),this._skipAdvance=!1},i.prototype.advanceFrame=function(){for(this._isTimelinePass=!0,0==this._skipFramesForStream&&this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex);this._skipFramesForStream>0;)R.execute_queue(),this.advanceFrameInternal(),this._skipFramesForStream=this._syncSounds(this._currentFrameIndex);this._isTimelinePass=!1},i.prototype.logHierarchy=function(t){void 0===t&&(t=0),this.printHierarchyName(t,this);for(var e,r=this._children.length,s=0;s<r;s++)(e=this._children[s]).isAsset(i)?e.logHierarchy(t+1):this.printHierarchyName(t+1,e)},i.prototype.printHierarchyName=function(t,e){for(var i="",r=0;r<t;++r)i+="--";i+=" "+e.name+" = "+e.id,console.log(i)},i.prototype.clear=function(){this.resetStreamStopped(),t.prototype.clear.call(this)},i.prototype._onChannelCompleteStopError=function(t){var i=t.target,r=i.owner,s=this._sounds[r.id],n=s?s.indexOf(i):-1;i.removeEventListener(e.BaseAudioChannel.COMPLETE,this._onChannelCompleteStopError),i.removeEventListener(e.BaseAudioChannel.STOP,this._onChannelCompleteStopError),i.removeEventListener(e.BaseAudioChannel.ERROR,this._onChannelCompleteStopError),-1!=n&&(s.splice(n,1),0===s.length&&this._removeSound(r))},i.prototype._stopChannels=function(t){for(var e=t.id,i=0,r=this._sounds[e];i<r.length;i++){r[i].stop()}},i.prototype._removeSound=function(t){delete this._sounds[t.id],t.isPlaying||delete i._activeSounds[t.id]},i.movieClipSoundsManagerClass=null,i._movieClips=[],i._activeSounds={},i.assetType="[asset MovieClip]",i}(y),V=function(t){function e(e,i,r,s){return t.call(this)||this}return l(e,t),Object.defineProperty(e.prototype,"downState",{get:function(){return this._downState},set:function(t){this._downState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this.enabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hitTestState",{get:function(){return this._hitTestState},set:function(t){this._hitTestState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overState",{get:function(){return this._overState},set:function(t){this._overState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"soundTransform",{get:function(){return console.log("soundTransform not implemented yet in flash/SimpleButton"),null},set:function(t){console.log("soundTransform not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackAsMenu",{get:function(){return console.log("trackAsMenu not implemented yet in flash/SimpleButton"),!1},set:function(t){console.log("trackAsMenu not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"upState",{get:function(){return this._upState},set:function(t){this._upState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useHandCursor",{get:function(){return console.log("useHandCursor not implemented yet in flash/SimpleButton"),!1},set:function(t){console.log("useHandCursor not implemented yet in flash/SimpleButton")},enumerable:!1,configurable:!0}),e}(y),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.assetType="[asset SkyboxElements]",e}(n.TriangleElements),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._includeDependencies=function(t){},e.prototype._getVertexCode=function(t,e,i){var r="",s=t.globalPosDependencies>0?i.globalPositionVertex:i.animatedPosition,n=e.getFreeVertexConstant();e.getFreeVertexConstant(),e.getFreeVertexConstant(),e.getFreeVertexConstant(),t.viewMatrixIndex=4*n.index;var o=e.getFreeVertexConstant();t.scenePositionIndex=4*o.index;var a=e.getFreeVertexConstant(),l=e.getFreeVertexVectorTemp();return r+="mul "+l+", "+s+", "+a+"\nadd "+l+", "+l+", "+o+"\n",t.projectionDependencies>0?(i.projectionFragment=e.getFreeVarying(),r+="m44 "+l+", "+l+", "+n+"\nmov "+i.projectionFragment+", "+l+"\nmov op, "+l+"\n"):r+="m44 op, "+l+", "+n+"\n",r},e.prototype._getFragmentCode=function(t,e,i){return""},e}(n._Render_ElementsBase),G=function(t){function r(){var i=null!==t&&t.apply(this,arguments)||this;return i._skyboxProjection=new e.Matrix3D,i}return l(r,t),r.prototype.draw=function(t,r,s,n){var o=r.scenePositionIndex,a=r.view.projection.transform.matrix3D.position;r.vertexConstantData[o++]=2*a.x,r.vertexConstantData[o++]=2*a.y,r.vertexConstantData[o++]=2*a.z,r.vertexConstantData[o++]=1,r.vertexConstantData[o++]=r.vertexConstantData[o++]=r.vertexConstantData[o++]=r.view.projection.far/Math.sqrt(3),r.vertexConstantData[o]=1;var l=new e.Vector3D;this._skyboxProjection.copyFrom(r.view.viewMatrix3D),this._skyboxProjection.copyRowTo(2,l);var h=l.x,c=l.y,u=l.z,p=-(l.x*a.x+l.y*a.y+l.z*a.z+Math.sqrt(h*h+c*c+u*u)),d=h>=0?1:-1,_=c>=0?1:-1,f=new e.Vector3D(d,_,1,1),g=this._skyboxProjection.clone();g.invert();var m=g.transformVector(f);this._skyboxProjection.copyRowTo(3,f);var y=(m.x*f.x+m.y*f.y+m.z*f.z+m.w*f.w)/(h*m.x+c*m.y+u*m.z+p*m.w);this._skyboxProjection.copyRowFrom(2,new e.Vector3D(h*y,c*y,u*y,p*y)),r.sceneMatrixIndex>=0&&r.sceneMatrix.copyFrom(t.entity.renderSceneTransform,!0),r.viewMatrix.copyFrom(this._skyboxProjection,!0);var b=this._pool.context;b.setProgramConstantsFromArray(i.ContextGLProgramType.VERTEX,r.vertexConstantData),b.setProgramConstantsFromArray(i.ContextGLProgramType.FRAGMENT,r.fragmentConstantData),this._indices?this.getIndexBufferGL().draw(i.ContextGLDrawMode.TRIANGLES,0,this.numIndices):this._pool.context.drawVertices(i.ContextGLDrawMode.TRIANGLES,n,s||this.numVertices)},r}(n._Stage_TriangleElements);n.RenderGroup.registerElements(H,j),i.Stage.registerAbstraction(G,j);var z=function(t){function s(e,r){void 0===e&&(e=16777215);var s=t.call(this)||this;return s._textures=new Array,s._blendMode=i.BlendMode.NORMAL,s.animateUVs=!1,s.bothSides=!1,s.curves=!1,s.imageRect=!1,s.useColorTransform=!1,s.alphaThreshold=0,s.alphaBlending=!0,s._onTextureInvalidateDelegate=function(t){return s.onTextureInvalidate(t)},s.style=new n.Style,e instanceof i.ImageCube?(s._style.image=e,s.texture=new n.ImageTextureCube):s._style.color=Number(e),s}return l(s,t),Object.defineProperty(s.prototype,"animationSet",{get:function(){return this._animationSet},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this._blendMode!=t&&(this._blendMode=t,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!=t&&(this._texture&&this.removeTexture(this._texture),this._texture=t,this._texture&&this.addTexture(this._texture),this.invalidatePasses())},enumerable:!1,configurable:!0}),s.prototype.getNumTextures=function(){return this._textures.length},s.prototype.getTextureAt=function(t){return this._textures[t]},s.prototype.getEntity=function(){return this},Object.defineProperty(s.prototype,"assetType",{get:function(){return s.assetType},enumerable:!1,configurable:!0}),s.prototype.invalidatePasses=function(){this.dispatchEvent(new n.MaterialEvent(n.MaterialEvent.INVALIDATE_PASSES,this))},s.prototype.addTexture=function(t){this._textures.push(t),t.addEventListener(e.AssetEvent.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},s.prototype.removeTexture=function(t){this._textures.splice(this._textures.indexOf(t),1),t.removeEventListener(e.AssetEvent.INVALIDATE,this._onTextureInvalidateDelegate),this.onTextureInvalidate()},s.prototype.onTextureInvalidate=function(t){this.invalidate()},s.prototype._onInvalidateProperties=function(t){this._invalidateMaterial(),this.invalidatePasses()},s.prototype._acceptTraverser=function(t){t.applyTraversable(this)},s.prototype.iAddOwner=function(t){},s.prototype.iRemoveOwner=function(t){},s.prototype._getDefaultBoundingVolume=function(){return r.BoundingVolumeType.NULL},s.prototype.testCollision=function(t,e){return t.pickable=null,!1},s.assetType="[asset Skybox]",s}(m),W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(e,i){t.prototype.init.call(this,e,i),this._shader=new n.ShaderBase(i,this,this,this._stage),this._texture=this._shader.abstractions.getAbstraction(this.material.texture),this._pAddPass(this)},e.prototype.onClear=function(){t.prototype.onClear.call(this),this._texture.onClear(),this._texture=null},e.prototype._pUpdateRender=function(){t.prototype._pUpdateRender.call(this);var e=this.material;this.requiresBlending=e.blendMode!=i.BlendMode.NORMAL,this.shader.setBlendMode(e.blendMode==i.BlendMode.NORMAL&&this.requiresBlending?i.BlendMode.LAYER:e.blendMode)},e.prototype._includeDependencies=function(e){t.prototype._includeDependencies.call(this,e),e.usesPositionFragment=!0},e.prototype._getFragmentCode=function(t,e){return this._texture._getFragmentCode(e.shadedTarget,t,e,e.positionVarying)},e.prototype._setRenderState=function(e){t.prototype._setRenderState.call(this,e),this._texture._setRenderState(e)},e.prototype._activate=function(){t.prototype._activate.call(this),this._stage.context.setDepthTest(!1,i.ContextGLCompareMode.LESS),this._texture.activate()},e}(n._Render_MaterialPassBase),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._getStageElements=function(){var t=e._elements;return t||((t=new j(new i.AttributesBuffer(11,4))).autoDeriveNormals=!1,t.autoDeriveTangents=!1,t.setIndices(Array(0,1,2,2,3,0,6,5,4,4,7,6,2,6,7,7,3,2,4,5,1,1,0,4,4,0,3,3,7,4,2,1,5,5,6,2)),t.setPositions(Array(-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1))),this._stage.abstractions.getAbstraction(t)},e.prototype._getRenderMaterial=function(){return this.entity.renderer.getRenderElements(this.stageElements.elements).abstractions.getAbstraction(this.renderable)},e.prototype._getStyle=function(){return this.renderable.style},e}(n._Render_RenderableBase);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t),e.prototype.isInFrustum=function(t,e,i,r){return!this.isInvisible()},e.prototype.isCastingShadow=function(){return!1}}(r.ContainerNode),n.DefaultRenderer.registerMaterial(W,z),n.RenderEntity.registerRenderable(Y,z);var X,K=function(){function t(){}return t.CENTER="center",t.LEFT="left",t.NONE="none",t.RIGHT="right",t}(),Z=function(){function t(){}return t.DYNAMIC="dynamic",t.INPUT="input",t.STATIC="input",t}();t.FontStyleName=void 0,(X=t.FontStyleName||(t.FontStyleName={})).STANDART="standart",X.BOLD="bold",X.ITALIC="italic",X.BOLDITALIC="boldItalic";var J=function(){function t(){}return t.CENTER="center",t.JUSTIFY="justify",t.LEFT="left",t.RIGHT="right",t}(),Q=function(){function t(t,e,i){void 0===t&&(t=null),void 0===e&&(e=null),void 0===i&&(i=null),this.fill_data=t,this.stroke_data=e,this.fill_data_path=i,this.fnt_channel=0,this.lastTesselatedScale=0,this.kerningCharCodes=[],this.kerningValues=[]}return t.prototype.dispose=function(){this.stroke_data&&(this.stroke_data=null),this.fill_data&&(this.fill_data=null),this.fill_data_path&&(this.fill_data_path=null)},t}(),$=function(t){this._stage=t},tt=function(){function t(){this.left=Number.MAX_VALUE,this.right=Number.MIN_VALUE,this.top=Number.MAX_VALUE,this.bottom=Number.MIN_VALUE}return t.prototype.grown=function(t,e){t<this.left&&(this.left=t),t>this.right&&(this.right=t),e<this.top&&(this.top=e),e>this.bottom&&(this.bottom=e)},t.prototype.toRect=function(){return new e.Rectangle(this.left,this.top,this.right-this.left,this.bottom-this.top)},t}(),et=function(t){function r(e,i){void 0===i&&(i=!1);var r=t.call(this,e)||this;return r.debug=!1,r.debug=i,r}return l(r,t),r.getCanvasContext=function(t,e,i){void 0===t&&(t=100),void 0===e&&(e=100),void 0===i&&(i=!1);var r="OffscreenCanvas"in self&&!i?new self.OffscreenCanvas(t,e):document.createElement("canvas");return r.width=t,r.height=e,r.getContext("2d",{desynchronized:!0,alpha:!0})},r.freeCanvasContext=function(t){t.canvas instanceof self.OffscreenCanvas||(t.canvas.width=0,t.canvas.height=0)},r.transformChar=function(t){var e=t.fill_data_path;if(0===e.commands.length)return null;for(var i=new Path2D,r=new tt,n=e.data,o=0,a=0,l=e.commands;a<l.length;a++){switch(l[a]){case s.GraphicsPathCommand.MOVE_TO:var h=n[o++]/20,c=n[o++]/20;r.grown(h,c),i.moveTo(h,c);break;case s.GraphicsPathCommand.LINE_TO:h=n[o++]/20,c=n[o++]/20;r.grown(h,c),i.lineTo(h,c);break;case s.GraphicsPathCommand.CURVE_TO:var u=n[o++]/20,p=n[o++]/20,d=n[o++]/20,_=n[o++]/20;r.grown(u,p),r.grown(d,_),i.quadraticCurveTo(u,p,d,_)}}return{path:i,char:t,rect:r.toRect()}},r.sortPatches=function(t,e){return t.rect.height-e.rect.height},r.render=function(t,i,s,n,o){void 0===n&&(n=0),void 0===o&&(o=0);for(var a=[],l=2*o,h=1,c=0,u=t.get_font_chars();c<u.length;c++){var p=u[c];(y=r.transformChar(p))&&((l+y.rect.width)*(l+y.rect.height),a.push(y))}a.sort(r.sortPatches),n&&(t.initFontSize(n),h=s/t.get_font_em_size()),i.save(),i.clearRect(0,0,s,s),i.fillStyle="#fff";for(var d=o,_=o,f=0,g=0,m=a;g<m.length;g++){var y;(y=m[g]).path&&(d+y.rect.width+l>=s/h&&(d=o,_+=f+l,f=0),_+y.rect.height>s/h&&console.warn("[FNTGeneratorCanvas] Font image overflow, font will corrupted!"),f=Math.max(y.rect.height,f),i.setTransform(h,0,0,h,(d-y.rect.x)*h,(_-y.rect.y)*h),i.fill(y.path),y.char.fnt_rect=new e.Rectangle(y.rect.x/y.char.char_width,y.rect.y/t.get_font_em_size(),y.rect.width/y.char.char_width,y.rect.height/t.get_font_em_size()),y.char.fnt_uv=new e.Rectangle(d*h/s,_*h/s,y.rect.width*h/s,y.rect.height*h/s),y.char.fnt_channel=0,d+=y.rect.width+l)}i.restore()},r.prototype.generate=function(t,s,n,o){var a=r.getCanvasContext(s,s,this.debug),l=[];for(var h in t.font_styles){var c=t.font_styles[h];r.render(c,a,s,n,o);for(var u=a.getImageData(0,0,s,s),p=new i.BitmapImage2D(s,s,!0,0,!0,this._stage),d=u.data,_=new Uint8ClampedArray(d.length),f=0;f<d.length;f+=4)_[f]=d[f+3],_[f+1]=d[f],_[f+2]=d[f+1],_[f+3]=d[f+2];p.setPixels(new e.Rectangle(0,0,s,s),_),l.push(p),c.addFNTChannel(p)}return this.debug?this.canvas=a.canvas:r.freeCanvasContext(a),l},r}($),it=Object.create(null);function rt(t,e){void 0===e&&(e="");var i=it[t._id+e];return it[t._id+e]=!0,!i}var st=function(t){function r(e){void 0===e&&(e=null);var i=t.call(this)||this;return i._font_chars_dic={},i._current_size=0,i._size_multiply=0,i._font_chars=[],i._font_em_size=32,i._ascent=0,i._descent=0,i._usesCurves=!1,i._glyphIdxToChar={},i._fntSizeLimit=-1,i._fnt_channels=[],e?(i._opentype_font=e,i._font_em_size=72,i._ascent=e.tables.hhea.ascender/(i._opentype_font.unitsPerEm/72),i._descent=e.tables.hhea.descender/(i._opentype_font.unitsPerEm/72)-2,i._current_size=0,i._size_multiply=0,i._opentype_font.charToGlyph(String.fromCharCode(32)),i):i}return l(r,t),r.prototype.addFNTChannel=function(t){this._fnt_channels.push(t)},r.prototype.getGlyphCount=function(){return this._font_chars.length},r.prototype.generateFNTData=function(t){if(!(this._fntSizeLimit>0)){var e=new et(t,!1).generate(this.font,this._font_em_size,this._current_size,4);e&&e.length>0&&(this._fntSizeLimit=4*this._current_size)}},r.prototype.generateFNTTextures=function(t,r,o){if(console.log("generateFNTTextures"),r&&(this._fntSizeLimit=.5*r,this.initFontSize(r)),this._opentype_font)for(var a=0;a<this._opentype_font.glyphs.length;a++){var l=this._opentype_font.charToGlyph(String.fromCharCode(this._opentype_font.glyphs.glyphs[a].unicode));if(l){var h=l.getPath(),c=new s.GraphicsPath,u=0,p=h.commands.length,d=0,_=0,f=this._ascent;for(u=0;u<p;u++){var g=h.commands[u];"M"===g.type?(c.moveTo(g.x,g.y+f),d=g.x,_=g.y+f):"L"===g.type?c.lineTo(g.x,g.y+f):"Q"===g.type?c.curveTo(g.x1,g.y1+f,g.x,g.y+f):"C"===g.type?c.cubicCurveTo(g.x1,g.y1+f,g.x2,g.y2+f,g.x,g.y+f):"Z"===g.type&&c.lineTo(d,_)}var m=new Q(null,null,c);m.char_width=l.advanceWidth*(1/l.path.unitsPerEm*72),m.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(c,!0),m.fill_data?(this._font_chars.push(m),this._font_chars_dic[this._opentype_font.glyphs.glyphs[a].unicode]=m):console.log("error tesselating opentype glyph",this._opentype_font.glyphs.glyphs[a])}else console.log("no char found for",this._opentype_font.glyphs.glyphs[a])}var y,b,v,x,w=0,E=0,A=[[]],D=0,T=[],S=Number.MIN_VALUE,C=Number.MIN_VALUE,P=Number.MAX_VALUE,I=Number.MAX_VALUE,O=0,N=0,L=0;for(u=0;u<this._font_chars.length;u++){for(y=this._font_chars[u].fill_data,b=new Float32Array(y.buffer),S=Number.MIN_VALUE,C=Number.MIN_VALUE,P=Number.MAX_VALUE,I=Number.MAX_VALUE,O=0,N=0,v=0;v<y.count;v++)(O=b[2*v])<I&&(I=O),O>C&&(C=O),(N=b[2*v+1])<P&&(P=N),N>S&&(S=N);this._font_chars[u].fnt_rect=new e.Rectangle(I/this._font_chars[u].char_width,P/this._font_em_size,(C-I)/this._font_chars[u].char_width,(S-P)/this._font_em_size),L+=(C-I+t+t)*(S-P+t+t),T[T.length]={idx:u,minx:I,miny:P,width:C-I,height:S-P}}T.sort((function(t,e){return t.height>e.height?-1:1}));var M=0;x=o;var F,k=1;if(r)this.initFontSize(r),k=this._size_multiply;else{k=x/Math.sqrt(L)*1.2;for(var R=!0,B=0;R;){R=!1,w=0,E=t;for(u=0;u<T.length;u++){if(B=T[u].height*k,O=0,N=0,(w+=t)+T[u].width*k+t>=x&&(w=t,E+=M+2*t,M=0),B>M&&(M=B),E+B+2*t>=x){R=!0,k*=.995;break}w+=T[u].width*k+t}}}this._fntSizeLimit=k*this._font_em_size*.5,w=0,E=t;for(u=0;u<T.length;u++){for(y=(F=this._font_chars[T[u].idx]).fill_data,b=new Float32Array(y.buffer),I=T[u].minx,C=Number.MIN_VALUE,P=T[u].miny,S=Number.MIN_VALUE,O=0,N=0,(w+=t)+T[u].width*k+t>=x&&(w=t,E+=M+2*t,M=0),T[u].height*=k,T[u].height>M&&(M=T[u].height),E+M+2*t>=x&&(w=t,E=t,M=0,A[++D]=[]),F.fnt_channel=D,v=0;v<y.count;v++)O=(b[2*v]-I)*k+w,N=(b[2*v+1]-P)*k+E,A[D][A[D].length]=O,A[D][A[D].length]=N,O>C&&(C=O),N>S&&(S=N);F.fnt_uv=new e.Rectangle(w/x,1-E/x,(C-w)/x,(S-E)/x),w+=T[u].width*k+t}var q=[];for(u=0;u<A.length;u++){var U=new i.AttributesView(Float32Array,2);U.set(A[u]);var V=U.attributesBuffer.cloneBufferView();U.dispose();var j=new n.TriangleElements(V);j.setPositions(new i.Float2Attributes(V));var H=s.Shape.getShape(j),G=new s.SolidFillStyle(16777215,1),z=s.MaterialManager.getMaterialForColor(G);H.material=z,z.getNumTextures()&&(H.style=new n.Style,H.style.image=s.TextureAtlas.getTextureForColor(G),H.style.uvMatrix=G.getUVMatrix()),q[u]=H}return q},r.prototype.getRatio=function(t){return this._size_multiply},r.prototype.hasChar=function(t){var e=!!this._font_chars_dic[t];return!e&&this._opentype_font&&(e=!!this._opentype_font.charToGlyph(String.fromCharCode(parseInt(t)))),e},r.prototype.changeOpenTypeFont=function(t,e){void 0===e&&(e=!0),e&&this._opentype_font,this._opentype_font=t,this._ascent=t.ascender,this._descent=t.descender,this._font_em_size=t.unitsPerEm;var i=this.getChar("32");i&&(this._whitespace_width=i.char_width)},r.prototype.initFontSize=function(t){this._current_size!==t&&(this._current_size=t,this._size_multiply=t/this._font_em_size,this._size_multiply)},r.prototype.getCharVertCnt=function(t){var e=this._font_chars_dic[t];return e?e.fill_data.length:0},r.prototype.getCharWidth=function(t){var e=this._whitespace_width*this._size_multiply||r.DEFAULT_SPACE;if("32"==t)return(20*e|0)/20;if("9"==t)return 2*e*20/20;var i=this.getChar(t,!1);return i?(i.char_width*this._size_multiply*20|0)/20:"9679"==t?((i=this.createPointGlyph_9679()).char_width*this._size_multiply*20|0)/20:0},Object.defineProperty(r.prototype,"usesCurves",{get:function(){return this._usesCurves},enumerable:!1,configurable:!0}),r.prototype.getLineHeight=function(){return this._size_multiply*(this._ascent-this.descent)},r.prototype.getUnderLineHeight=function(){return this._size_multiply*(this._ascent-this.descent/2)},Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){for(var t=0;t<this._font_chars.length;t++)this._font_chars[t].dispose();this._font_chars.length=0,this._font_chars_dic=null},Object.defineProperty(r.prototype,"fntSizeLimit",{get:function(){return this._fntSizeLimit},set:function(t){this._fntSizeLimit=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ascent",{get:function(){return this._ascent},set:function(t){this._ascent=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"descent",{get:function(){return this._descent},set:function(t){this._descent=t},enumerable:!1,configurable:!0}),r.prototype.get_font_chars=function(){return this._font_chars},r.prototype.get_font_em_size=function(){return this._font_em_size},r.prototype.set_whitespace_width=function(t){this._whitespace_width=t},r.prototype.get_whitespace_width=function(){return this._whitespace_width},r.prototype.set_font_em_size=function(t){this._font_em_size=t},r.prototype.buildTextLineFromIndices=function(t,i,r,n,o,a){var l=t.getTextShapeForIdentifierAndFormat(i.color.toString(),i),h=r,c=o.length,u=[],p=0;n-=this._ascent*this._size_multiply;for(var d=0;d<c;d++){var _=o[d],f=this._glyphIdxToChar[_];if(f){null===f.fill_data&&(f.fill_data_path.commands[0]==s.GraphicsPathCommand.MOVE_TO&&0==f.fill_data_path.data[0]&&0==f.fill_data_path.data[1]&&(f.fill_data_path.data.shift(),f.fill_data_path.data.shift(),f.fill_data_path.commands.shift(),f.fill_data_path.commands[0]=s.GraphicsPathCommand.LINE_TO),f.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(f.fill_data_path,!0));var g=f.fill_data;g&&(u.push({char:f,x:r,y:n,selected:!1}),p+=g.buffer.byteLength/4),r+=a[d]}else r+=a[d]}var m=new Float32Array(p);return this._fillBuffer(m,u,!1),l.addChunk(m),new e.Point(r-h,this.getLineHeight())},r.prototype.fillTextRun=function(t,e,i,r){if(this._fntSizeLimit>=0&&this._fntSizeLimit>=e.size)return this.fillTextRunFNT(t,e,i,r);var s,n,o=this._queryShape(t,e),a=i+r,l=this._size_multiply,h=t.selectionBeginIndex,c=t.selectionEndIndex,u=0;t.selectable&&((n=e.clone()).color=16777215,s=this._queryShape(t,n),n.underline&&i+1<t.words.length&&(u=t.words.get(i).x),t.selectionEndIndex<t.selectionBeginIndex&&(h=t.selectionEndIndex,c=t.selectionBeginIndex));for(var p=0,d=0,_=[],f=[],g=[],m=i;m<a;m+=1){for(var y=t.words.get(m),b=y.x,v=y.y,x=y.start,w=x+y.len,E=x;E<w;E++){var A=t.isInFocus&&E>=h&&E<c?s:o,D=t.chars_codes[E];if(32!==D&&9!==D){var T=this.getChar(D,!0);T?(A===s?(f.push({char:T,x:b,y:v,selected:!0}),p+=T.fill_data.buffer.byteLength/4):(_.push({char:T,x:b,y:v,selected:!1}),d+=T.fill_data.buffer.byteLength/4),b+=T.char_width*l):rt(this,"miss"+t.chars_codes[E])&&console.debug("[TesselatedFontTable] Error: char not found in fontTable",t.chars_codes[E],String.fromCharCode(t.chars_codes[E]))}}var S=.25*t.internalScale.y,C=v+this.getUnderLineHeight()+S,P=v+this.getUnderLineHeight()-S;if(t.selectable&&n.underline&&i+1<t.words.length){var I=new Float32Array(12);I[0]=u,I[1]=P,I[2]=u,I[3]=C,I[4]=b,I[5]=C,I[6]=b,I[7]=C,I[8]=b,I[9]=P,I[10]=u,I[11]=P,g.push(I)}}if(d>0){d+=12*g.length;for(var O=new Float32Array(d),N=this._fillBuffer(O,_,!1),L=0,M=g;L<M.length;L++){var F=M[L];O.set(F,N),N+=F.length}o.addChunk(O)}if(p>0){O=new Float32Array(p);this._fillBuffer(O,f,!0),s.addChunk(O)}},r.prototype._cacheKey=function(t,e){void 0===t&&(t=16777215),void 0===e&&(e=-1);var i=e>=0;return"".concat(t).concat(i).concat(i?e:0)},r.prototype._queryShape=function(t,i,r){void 0===r&&(r=-1);var s=t.getTextShapeForIdentifierAndFormat(this._cacheKey(i.color,r),i);if(r>=0&&!s.fntBitmap){var n=e.ColorUtils.float32ColorToARGB(i.color);s.fntBitmap=this._fnt_channels[r],s.fntColorTransform=new e.ColorTransform(n[1]/255,n[2]/255,n[3]/255)}return s},r.prototype.fillTextRunFNT=function(t,e,i,r){var s,n=this._queryShape(t,e,0),o={},a={},l=i+r,h=this._size_multiply,c=t.selectionBeginIndex,u=t.selectionEndIndex;if(t.selectable){var p=e.clone();p.color=16777215,a[(s=this._queryShape(t,p,0)).cacheId]=s,p.underline&&i+1<t.words.length&&t.words.get(i).x,t.selectionEndIndex<t.selectionBeginIndex&&(c=t.selectionEndIndex,u=t.selectionBeginIndex)}o[n.cacheId]=n;for(var d=new Map,_=i;_<l;_+=1)for(var f=t.words.get(_),g=f.x,m=f.y,y=f.start,b=y+f.len,v=null,x=null,w=0,E=-1,A=y;A<b;A++)if(32!==t.chars_codes[A]&&9!==t.chars_codes[A]){var D=this.getChar(t.chars_codes[A],!1);if(D){var T=n,S=o;t.isInFocus&&A>=c&&A<u&&(T=s,S=a);var C=T.format,P=v?v.cacheId:"";P&&w===C.color&&D.fnt_channel===E||(P=this._cacheKey(C.color,D.fnt_channel),w=C.color,E=D.fnt_channel);var I=v&&v.cacheId!==P?S[P]:v;I||(S[(I=this._queryShape(t,C,D.fnt_channel)).cacheId]=I),v===I&&x||(x=d.get(I)||{uv:[],pos:[]},d.set(I,x),v=I),this._emitCharFNT(x,D,g,m),g+=D.char_width*h}else rt(this,"miss"+t.chars_codes[A])&&console.debug("[TesselatedFontTable] Error: char not found in fontTable",t.chars_codes[A],String.fromCharCode(t.chars_codes[A]))}for(var O=0,N=Array.from(d.keys());O<N.length;O++){var L=N[O],M=d.get(L);L.addChunk(new Float32Array(M.pos),new Float32Array(M.uv))}},r.prototype._emitCharFNT=function(t,e,i,r){var s=this._size_multiply,n=this._font_em_size*s,o=e.fnt_rect,a=e.fnt_uv,l=e.char_width*s;if(o){var h=i+l*o.x*20,c=h+l*o.width*20,u=r+n*o.y*20,p=u+n*o.height*20;t.pos.push(h,u,h,p,c,u,c,u,h,p,c,p),t.uv.push(a.x,a.y,a.x,a.bottom,a.right,a.y,a.right,a.y,a.x,a.bottom,a.right,a.bottom)}},r.prototype.createPointGlyph_9679=function(){var t=[];s.GraphicsFactoryHelper.drawElipse(this._font_em_size/2,this._font_em_size/2,this._font_em_size/8,this._font_em_size/8,t,0,360,5,!1);var e=new i.AttributesView(Float32Array,2);e.set(t);var r=e.attributesBuffer.cloneBufferView();e.dispose();var n=new Q(r,null,null);return n.char_width=this._font_em_size,this._font_chars.push(n),this._font_chars_dic[9679]=n,n},r.prototype.getCharOpenType=function(t){if(!this._opentype_font)return null;var e=this._opentype_font.charToGlyph(String.fromCharCode(parseInt(t)));if(!e)return null;var i=e.getPath(),r=new s.GraphicsPath,n=0,o=i.commands.length,a=0,l=0,h=this._ascent,c=this._opentype_font.unitsPerEm/72;for(n=0;n<o;n++){var u=i.commands[n];if("M"===u.type)r.moveTo(c*u.x,c*u.y+h),a=c*u.x,l=c*u.y+h;else if("L"===u.type)r.lineTo(c*u.x,c*u.y+h);else if("Q"===u.type)r.curveTo(c*u.x1,c*u.y1+h,c*u.x,c*u.y+h);else if("C"===u.type){var p=u.x1+(u.x2-u.x1)/2,d=u.y1+(u.y2-u.y1)/2;r.curveTo(c*u.x1,c*u.y1+h,c*p,c*d+h),r.curveTo(c*u.x2,c*u.y2+h,c*u.x,c*u.y+h)}else"Z"===u.type&&r.lineTo(a,l)}var _=new Q(null,null,r);if(_.char_width=e.advanceWidth,_.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(r,!0,null,c*f.FONT_TESSELATION_QUALITY),_.lastTesselatedScale=c,!_.fill_data)return rt(this,"tess"+t)&&console.debug("[TesselatedFontTable] Error:tesselating opentype glyph:",t.charCodeAt(0)),null;this._font_chars.push(_),this._font_chars_dic[t]=_},r.prototype.getChar=function(t,e){void 0===e&&(e=!0),t=""+t;var i=this._font_chars_dic[t];if(!e&&i)return i;if(!i)return this._opentype_font?this.getCharOpenType(t):"9679"==t?this.createPointGlyph_9679():null;var r=this._size_multiply,n=Math.max(.01,Math.round(100*r)/100);if(null===i.fill_data_path)return null;if((null!=i.fill_data||null!=i.stroke_data)&&i.lastTesselatedScale>=n)return i;var o=i.fill_data_path;return o.commands[0]==s.GraphicsPathCommand.MOVE_TO&&0==o.data[0]&&0==o.data[1]&&(o.data.shift(),o.data.shift(),o.commands.shift(),o.commands[0]=s.GraphicsPathCommand.LINE_TO),i.fill_data&&i.fill_data.clear(),i.fill_data=s.GraphicsFactoryFills.pathToAttributesBuffer(i.fill_data_path,!0,null,n*f.FONT_TESSELATION_QUALITY),i.lastTesselatedScale>0&&console.debug("[TesselatedFontTable] Retesselate char from scale:",i.lastTesselatedScale,n,String.fromCharCode(+t)),i.lastTesselatedScale=n,i.fill_data?i:(rt(this,"tess"+t)&&console.debug("[TesselatedFontTable] Error:tesselating glyph:",t.charCodeAt(0)),null)},r.prototype.setChar=function(t,e,i,r,s,n,o){if(void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=!1),void 0===n&&(n=0),void 0===o&&(o=null),e=Math.floor(20*e)/20,null==i&&null==r&&null==o)throw"TesselatedFontTable: trying to create a TesselatedFontChar with no data \n\t\t\t\t(fills_data, stroke_data and fill_data_path is null)";if(this._font_chars.length>0){if(s!=this._usesCurves)throw"TesselatedFontTable: Can not set different types of graphic-glyphs\n\t\t\t\t\t(curves vs non-cuves) on the same FontTable!"}else this._usesCurves=s;var a=new Q(i,r,o);a.char_width=e,a.glyph_idx=n,a.name=t,this._glyphIdxToChar[n]=a,this._font_chars.push(a),this._font_chars_dic[t]=a},r.prototype.roundTo=function(t){var e=f.TEXT_SHAPE_ROUND_PRECISION,i=1/(e||1);return Math.floor(t*i)*e},r.prototype._fillBuffer=function(t,e,i){void 0===i&&(i=!1);for(var r=this._size_multiply,s=0,n=0,o=e;n<o.length;n++){var a=o[n];if(a.selected===i){for(var l=a.x,h=a.y,c=a.char,u=new Float32Array(c.fill_data.buffer),p=u.length,d=0;d<p;d+=2)t[s+d+0]=this.roundTo(u[d+0]*r+l),t[s+d+1]=this.roundTo(u[d+1]*r+h);s+=u.length}}return s},r.assetType="[asset TesselatedFontTable]",r.DEFAULT_SPACE=14,r}(e.AssetBase),nt=function(t,e,i,r,s,n,o,a,l,h){this.id=t,this.x=e,this.y=i,this.width=r,this.height=s,this.x_offset=n,this.y_offset=o,this.x_advance=a,this.page=l,this.channel=h},ot=function(t){function e(){var e=t.call(this)||this;return e._font_chars=[],e._materials=[],e._font_chars_dic=new Object,e._ascent=0,e._descent=0,e._current_size=0,e._size_multiply=0,e._init_size=0,e._texture_width=0,e._texture_height=0,e._adjust_size=0,e}return l(e,t),e.prototype.getGlyphCount=function(){return this._font_chars.length},Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.initFontSize=function(t){this._adjust_size&&(t*=this._adjust_size),this._current_size!=t&&(this._current_size=t,this._size_multiply=t/this._init_size)},e.prototype.getCharDataCanvas=function(t){var e=this._font_chars_dic[t];return e?[e.x,e.y,e.width,e.height,e.x_offset*this._size_multiply,e.y_offset*this._size_multiply]:[]},e.prototype.getCharData=function(t){var e=this._font_chars_dic[t];if(e){var i=e.height/this._init_size*this._current_size,r=e.width/this._init_size*this._current_size;return[e.x/this._texture_width,e.y/this._texture_height,e.width/this._texture_width,e.height/this._texture_height,e.x_offset*this._size_multiply,e.y_offset*this._size_multiply,i,r]}return[]},e.prototype.getCharVertCnt=function(t){return 24},Object.defineProperty(e.prototype,"texture_width",{get:function(){return this._texture_width},set:function(t){this._texture_width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture_height",{get:function(){return this._texture_height},set:function(t){this._texture_height=t},enumerable:!1,configurable:!0}),e.prototype.hasChar=function(t){return null!=this._font_chars_dic[t]},e.prototype.getCharWidth=function(t){var e=this._font_chars_dic[t];return e?this._size_multiply*e.x_advance:0},e.prototype.fillTextRun=function(t,e,i,r){},e.prototype.getLineHeight=function(){return this._current_size},e.prototype.dispose=function(){for(var t=this._materials.length,e=0;e<t;++e)this._materials[e].dispose();this._materials.length=0,this._font_chars.length=0,this._font_chars_dic=null},e.prototype.addMaterial=function(t){this._materials.push(t)},e.prototype.getMaterial=function(t){return void 0===t&&(t=0),this._materials[t]},Object.defineProperty(e.prototype,"ascent",{get:function(){return this._ascent},set:function(t){this._ascent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"descent",{get:function(){return this._descent},set:function(t){this._descent=t},enumerable:!1,configurable:!0}),e.prototype.get_font_chars=function(){return this._font_chars},e.prototype.get_font_em_size=function(){return this._font_em_size},e.prototype.set_whitespace_width=function(t){this._whitespace_width=t},e.prototype.get_whitespace_width=function(){return this._whitespace_width},e.prototype.set_font_em_size=function(t){this._font_em_size=t},e.prototype.getChar=function(t){return this._font_chars_dic[t]},e.prototype.setChar=function(t,e,i,r,s,n,o,a,l,h){var c=new nt(t,e,i,r,s,n,o,a,l,h);this._font_chars.push(c),this._font_chars_dic[t]=c},e.assetType="[asset BitmapFontTable]",e}(e.AssetBase),at=function(t){function e(){var e=t.call(this)||this;return e._font_styles={},e.fontName=null,e.regularFontStyle=null,e}return l(e,t),Object.defineProperty(e,"emptyFontTable",{get:function(){return this._emptyFontTable||(this._emptyFontTable=new st),this._emptyFontTable},enumerable:!1,configurable:!0}),e.registerFont=function(t){},Object.defineProperty(e.prototype,"font_styles",{get:function(){return this._font_styles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(var t in this._font_styles)this._font_styles[t].dispose();this._font_styles=null},e.prototype.replace_font_table=function(t,e){this._font_styles[t]=e},e.prototype.create_font_table=function(t,e,i){void 0===e&&(e=st.assetType),void 0===i&&(i=null),this.get_font_table(t,e,i)&&console.warn("[Font] - create_font_table - ".concat(t," - already exists"));var r=null;return e==st.assetType?r=new st(i):e==ot.assetType&&(r=new ot),r.name=t,r.font=this,this._font_styles[t]=r,r},e.prototype.get_font_table=function(t,e,i,r){void 0===e&&(e=st.assetType),void 0===r&&(r=!1);var s=this._font_styles[t];if(s){if(s.assetType!=e)throw"[Font] - get_font_table - existing table has wrong assetType";return s}if(r&&Object.keys(this._font_styles).length>0)for(var n in this._font_styles)return console.log("font style not found return different",n),this._font_styles[n];return null},e.assetType="[asset Font]",e}(e.AssetBase),lt=function(){function t(){}return t.getDeviceFont=function(t){if(t=this.getDeviceFontName(t),this._deviceFonts[t])return this._deviceFonts[t];var e=new at;return e.name=t,this._deviceFonts[t]=e,this._deviceFonts[t]},t.getDeviceFontName=function(t){if(!t)return"sans";for(var e in this.deviceFontMap){if(this.deviceFontMap[e].indexOf(t)>=0)return e}return console.warn("[DeviceFontManager] - no mapping exists for ".concat(t,"\n\t\t - falling back to ").concat("sans")),"sans"},t.deviceFontMap={},t._deviceFonts={},t}();lt.deviceFontMap.sans=["_sans","Arial"],lt.deviceFontMap["Arial Narrow"]=["Arial Narrow"],lt.deviceFontMap["Arial Black"]=["Arial Black"],lt.deviceFontMap.serif=[],lt.deviceFontMap.typewriter=[];var ht,ct=function(){function t(){}return t.defineFont_CFF=function(t,i){void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[i]||(this._embbedCFF_fonts[i]={});var r=this._embbedCFF_fonts[i][t];return r||((r=new at).name=t,this._embbedCFF_fonts[i][t]=r,r)},t.getFont_CFF=function(t,i){if(void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),!t)return lt.getDeviceFont(t);var r=i||e.AssetBase.DEFAULT_NAMESPACE;this._embbedCFF_fonts||(this._embbedCFF_fonts={}),this._embbedCFF_fonts[r]||(this._embbedCFF_fonts[r]={});var s=this._embbedCFF_fonts[r][t];if(s)return s;for(var n in this._embbedCFF_fonts)if(this._embbedCFF_fonts[n][t])return this._embbedCFF_fonts[n][t];return lt.getDeviceFont(t)},t.defineFont=function(t,i){if(void 0===i&&(i=e.AssetBase.DEFAULT_NAMESPACE),this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[i]||(this._registered_fonts[i]={}),this.deviceFontsLoading)return lt.getDeviceFont(t);var r=this._registered_fonts[i][t];return r||((r=new at).name=t,-1===this._namespaces.indexOf(i)&&this._namespaces.push(i),this._registered_fonts[i][t]=r,r)},t.registerFontForClassName=function(t,e){this._registered_fonts_by_className[e]=t},t.getFont=function(t,i){if(void 0===i&&(i=void 0),!t)return null;if(this._registered_fonts_by_className[t])return this._registered_fonts_by_className[t];var r=i||e.AssetBase.DEFAULT_NAMESPACE;this._registered_fonts||(this._registered_fonts={}),this._registered_fonts[r]||(this._registered_fonts[r]={});var s=this._registered_fonts[r][t];if(s)return s;if(this._namespaces.length>0&&!i)for(var n=0,o=this._namespaces;n<o.length;n++){var a=o[n];if(this._registered_fonts[a][t])return this._registered_fonts[a][t]}return lt.getDeviceFont(t)},t.clearAll=function(){this.deviceFontsLoading=!1,this._registered_fonts={}},t.deviceFontsLoading=!1,t._registered_fonts={},t._registered_fonts_by_className={},t._namespaces=[],t._embbedCFF_fonts={},t}();t.FontLookUpMode=void 0,(ht=t.FontLookUpMode||(t.FontLookUpMode={})).DEFAULT="DEFAULT",ht.DEVICE="device",ht.EMBED_CFF="embeddedCFF";var ut,pt=["font","align","leftMargin","rightMargin","indent","size","color","bold","italic","underline","leading","letterSpacing"],dt=function(e){function i(i,r,s,n,o,a,l,h,c,u,p,d,_){void 0===i&&(i="_sans"),void 0===r&&(r=null),void 0===s&&(s=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===l&&(l=null),void 0===h&&(h=null),void 0===c&&(c=null),void 0===u&&(u=null),void 0===p&&(p=null),void 0===d&&(d=null),void 0===_&&(_=null);var f=e.call(this)||this;return f.fontLookUpMode=t.FontLookUpMode.DEFAULT,f._updateID=0,f._fontTableDirty=!0,f._font=null,f.tabStops=[],f._size=r,f._color=s,f._bold=n,f._italic=o,f._underline=a,f.url=l,f.link_target=h,f._align=c,f._leftMargin=u,f._rightMargin=p,f._indent=d,f._leading=_,"string"==typeof i?f.font_name=i:f.font=i,f}return l(i,e),Object.defineProperty(i.prototype,"updateID",{get:function(){return this._updateID},enumerable:!1,configurable:!0}),i.prototype.hasPropertySet=function(t){return null!==this["_"+t]},Object.defineProperty(i.prototype,"align",{get:function(){return this._align?this._align:J.LEFT},set:function(t){this._align!==t&&this._updateID++,this._align=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blockIndent",{get:function(){return this._blockIndent?this._blockIndent:0},set:function(t){this._blockIndent!==t&&this._updateID++,this._blockIndent=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leftMargin",{get:function(){return this._leftMargin?this._leftMargin:0},set:function(t){t!==this._leftMargin&&this._updateID++,this._leftMargin=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rightMargin",{get:function(){return this._rightMargin?this._rightMargin:0},set:function(t){t!==this._rightMargin&&this._updateID++,this._rightMargin=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"indent",{get:function(){return this._indent?this._indent:0},set:function(t){t!==this._indent&&this._updateID++,this._indent=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return null!==this._color?this._color:0},set:function(t){t!==this._color&&this._updateID++,this._color=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"kerning",{get:function(){return!!this._kerning&&this._kerning},set:function(t){t!==this._kerning&&this._updateID++,this._kerning=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leading",{get:function(){return this._leading?this._leading:0},set:function(t){t!==this._leading&&this._updateID++,this._leading=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"letterSpacing",{get:function(){return this._letterSpacing?this._letterSpacing:0},set:function(t){t!==this._letterSpacing&&this._updateID++,this._letterSpacing=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"size",{get:function(){return this._size?this._size:12},set:function(t){t!==this._size&&this._updateID++,this._size=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bold",{get:function(){return!!this._bold&&this._bold},set:function(t){t!==this._bold&&this._updateID++,this._bold=t,this._fontTableDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"italic",{get:function(){return!!this._italic&&this._italic},set:function(t){t!==this._italic&&this._updateID++,this._italic=t,this._fontTableDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"underline",{get:function(){return!!this._underline&&this._underline},set:function(t){t!==this._underline&&this._updateID++,this._underline=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"font_table",{get:function(){return this._font_table&&!this._fontTableDirty||this.update_font_table(),this._font_table},set:function(t){this._font_table=t,this._fontTableDirty=!1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"font_name",{get:function(){var t;return null===(t=this.font)||void 0===t?void 0:t.name},set:function(e){var i;(null===(i=this.font)||void 0===i?void 0:i.name)!=e&&(this.fontLookUpMode==t.FontLookUpMode.DEFAULT?this._font=ct.getFont(e):this.fontLookUpMode==t.FontLookUpMode.DEVICE?this._font=lt.getDeviceFont(e):this.fontLookUpMode==t.FontLookUpMode.EMBED_CFF&&(this._font=ct.getFont_CFF(e)),this._fontTableDirty=!0,this._updateID++)},enumerable:!1,configurable:!0}),i.prototype.update_font_table=function(){this._fontTableDirty=!1;var e=t.FontStyleName.STANDART;if(this._italic&&!this._bold?e=t.FontStyleName.ITALIC:!this._italic&&this._bold?e=t.FontStyleName.BOLD:this._italic&&this._bold&&(e=t.FontStyleName.BOLDITALIC),this._font){var i=this._font.get_font_table(e,st.assetType,null,!0);if(this._font_table&&!i)return;this._font_table=i||at.emptyFontTable}},Object.defineProperty(i.prototype,"font",{get:function(){return this._font},set:function(t){this._font!=t&&(this._font=t,this._fontTableDirty=!0,this._updateID++)},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t=new i(this._font,this._size,this._color,this._bold,this._italic,this._underline,this.url,this.link_target,this._align,this._leftMargin,this._rightMargin,this._indent,this._leading);return t.font_table=this._font_table,t},i.prototype.equal=function(t){for(var e=0,i=pt;e<i.length;e++){var r=i[e];if(this[r]!==t[r])return!1}return!0},i.prototype.applyToFormat=function(t){for(var e=!1,i=0,r=pt;i<r.length;i++){var s=r[i];null!==this["_"+s]&&t[s]!==this["_"+s]&&(e=!0,t[s]=this["_"+s])}return e},i.prototype.mergeFormat=function(t){for(var e=0,i=pt;e<i.length;e++){var r=i[e];this["_"+r]!==t[r]&&(this["_"+r]=null)}},Object.defineProperty(i.prototype,"assetType",{get:function(){return i.assetType},enumerable:!1,configurable:!0}),i.assetType="[asset TextFormat]",i}(e.AssetBase),_t=function(t,e,i,r,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===n&&(n=0),this.x=t,this.width=e,this.height=i,this.ascent=r,this.descent=s,this.leading=n},ft=function(t){function e(e,i,r){void 0===r&&(r=0);var s=t.call(this,e)||this;return s._char=i,s._charCode=r,s.isShift=!1,s.isCTRL=!1,s.isAlt=!1,s}return l(e,t),Object.defineProperty(e.prototype,"char",{get:function(){return this._char},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"charCode",{get:function(){return this._charCode},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._char,this._charCode)},e.KEYDOWN="keydown",e.KEYUP="keyup",e}(e.EventBase),gt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.clone=function(){return new e(this.type)},e.CHANGED="onChanged",e}(e.EventBase),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),Object.defineProperty(e.prototype,"assetType",{get:function(){return e.assetType},enumerable:!1,configurable:!0}),e.prototype.getEntity=function(){var t=this.parentTextField;return!t._textFormats[0]||t._textFormats[0].font_table.isAsset(st)||t._textFormats[0].bitmap||(this.transform.colorTransform.color=null!=t.textColor?t.textColor:t._textFormats[0].color,this._invalidateHierarchicalProperty(r.HierarchicalProperty.COLOR_TRANSFORM)),this._graphics},e.assetType="[asset TextSprite]",e}(y),yt=function(){function t(t,e){this.format=t,this.cacheId=e,this.verts=[],this.uvs=[],this._length=0,this.verts=[],this.uvs=[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(!(t>this._length)){var e=this.verts,i=this.uvs;if(0===t)return this._length=0,e.length=0,void(i.length=0);for(var r=0,s=t;r<e.length&&s>0;)s-=e[r].length,r++;s<0&&(e[r-1]=e[r-1].subarray(0,s+e[r-1].length),i[r-1]&&(i[r-1]=i[r-1].subarray(0,s+i[r-1].length))),e.length=r,this._length=t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasUV",{get:function(){return this.uvs.length>0},enumerable:!1,configurable:!0}),t.prototype.addChunk=function(t,e){if(this.verts.length!==this.uvs.length&&e)throw"You can't mix TextShape with UV and without in same place";if(e&&t.length!==e.length)throw"Position buffer and UV buffer should has equal size";this._length+=t.length,this.verts.push(t),e&&this.uvs.push(e)},Object.defineProperty(t.prototype,"tall",{get:function(){return this.verts[this.verts.length-1]},enumerable:!1,configurable:!0}),t}();class bt{constructor(){this.childNodes=[]}get innerText(){return this.rawText}}!function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE"}(ut||(ut={}));var vt=ut;class xt extends bt{constructor(t){super(),this.rawText=t,this.nodeType=vt.COMMENT_NODE}get text(){return this.rawText}toString(){return`\x3c!--${this.rawText}--\x3e`}}var wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};
|
|
2
2
|
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
|
|
3
|
-
var Et=function(t){var e={exports:{}};return t(e,e.exports),e.exports}((function(t,e){!function(i){var r=e,s=t&&t.exports==r&&t,n="object"==typeof wt&&wt;n.global!==n&&n.window!==n||(i=n);var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,h=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},u=/["&'<>`]/g,p={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},d=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,_=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,g={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},m={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},y={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},b=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],v=String.fromCharCode,x={}.hasOwnProperty,w=function(t,e){return x.call(t,e)},E=function(t,e){if(!t)return e;var i,r={};for(i in e)r[i]=w(t,i)?t[i]:e[i];return r},A=function(t,e){var i="";return t>=55296&&t<=57343||t>1114111?(e&&S("character reference outside the permissible Unicode range"),"�"):w(y,t)?(e&&S("disallowed character reference"),y[t]):(e&&function(t,e){for(var i=-1,r=t.length;++i<r;)if(t[i]==e)return!0;return!1}(b,t)&&S("disallowed character reference"),t>65535&&(i+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=v(t))},D=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},T=function(t){return"&#"+t+";"},S=function(t){throw Error("Parse error: "+t)},C=function(t,e){(e=E(e,C.options)).strict&&_.test(t)&&S("forbidden code point");var i=e.encodeEverything,r=e.useNamedReferences,s=e.allowUnsafeSymbols,n=e.decimal?T:D,p=function(t){return n(t.charCodeAt(0))};return i?(t=t.replace(a,(function(t){return r&&w(c,t)?"&"+c[t]+";":p(t)})),r&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(t=t.replace(h,(function(t){return"&"+c[t]+";"})))):r?(s||(t=t.replace(u,(function(t){return"&"+c[t]+";"}))),t=(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(h,(function(t){return"&"+c[t]+";"}))):s||(t=t.replace(u,p)),t.replace(o,(function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1);return n(1024*(e-55296)+i-56320+65536)})).replace(l,p)};C.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var P=function(t,e){var i=(e=E(e,P.options)).strict;return i&&d.test(t)&&S("malformed character reference"),t.replace(f,(function(t,r,s,n,o,a,l,h,c){var u,p,d,_,f,y;return r?g[f=r]:s?(f=s,(y=n)&&e.isAttributeValue?(i&&"="==y&&S("`&` did not start a character reference"),t):(i&&S("named character reference was not terminated by a semicolon"),m[f]+(y||""))):o?(d=o,p=a,i&&!p&&S("character reference was not terminated by a semicolon"),u=parseInt(d,10),A(u,i)):l?(_=l,p=h,i&&!p&&S("character reference was not terminated by a semicolon"),u=parseInt(_,16),A(u,i)):(i&&S("named character reference was not terminated by a semicolon"),t)}))};P.options={isAttributeValue:!1,strict:!1};var I={version:"1.2.0",encode:C,decode:P,escape:function(t){return t.replace(u,(function(t){return p[t]}))},unescape:P};if(r&&!r.nodeType)if(s)s.exports=I;else for(var O in I)w(I,O)&&(r[O]=I[O]);else i.he=I}(wt)}));class At extends bt{constructor(t){super(),this.rawText=t,this.nodeType=vt.TEXT_NODE}get text(){return this.rawText}get isWhitespace(){return/^(\s| )*$/.test(this.rawText)}toString(){return this.text}}let Dt={};function Tt(t,e){return t?e?t.toLowerCase()===e.toLowerCase():!t:!e}const St={f145(t,e,i){if(e=e||"",i=i||[],t.id!==e.substr(1))return!1;for(let e=i,r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f45(t,e,i){for(let e=i=i||[],r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f15:(t,e)=>(e=e||"",t.id===e.substr(1)),f1(t,e){if(e=e||"",t.id!==e.substr(1))return!1},f5:()=>!0,f55(t,e,i,r){r=r||"";return t.attributes.hasOwnProperty(r)},f245(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f25(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f2(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f345(t,e,i){if(e=e||"",i=i||[],!Tt(t.tagName,e))return!1;for(let e=i,r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f35:(t,e)=>(e=e||"",Tt(t.tagName,e)),f3:(t,e)=>(e=e||"",Tt(t.tagName,e))};class Ct{constructor(t){this.nextMatch=0,this.matchers=t.split(" ").map((t=>{if(Dt[t])return Dt[t];const e=t.split("."),i=e[0],r=e.slice(1).sort();let s="f",n="",o="";if(i&&"*"!==i)if(i.startsWith("#"))s+="1";else{const t=/\[\s*([\w-]+)(\s*=\s*(('\s*(.*)'|"\s*(.*)")|(\S*)))?\s*\]/.exec(i);t?(n=t[1],o=t[5]||t[6]||t[7],s+="2"):s+="3"}r.length>0&&(s+="4"),s+="5";const a={func:St[s],tagName:i||"",classes:r||"",attr_key:n||"",value:o||""};return Dt[t]=a}))}advance(t){return!!(this.nextMatch<this.matchers.length&&this.matchers[this.nextMatch].func(t,this.matchers[this.nextMatch].tagName,this.matchers[this.nextMatch].classes,this.matchers[this.nextMatch].attr_key,this.matchers[this.nextMatch].value))&&(this.nextMatch++,!0)}rewind(){this.nextMatch--}get matched(){return this.nextMatch===this.matchers.length}reset(){this.nextMatch=0}flushCache(){Dt={}}}function Pt(t){return t[t.length-1]}const It=new Map;It.set("DIV",!0),It.set("div",!0),It.set("P",!0),It.set("p",!0),It.set("LI",!0),It.set("li",!0),It.set("TD",!0),It.set("td",!0),It.set("SECTION",!0),It.set("section",!0),It.set("BR",!0),It.set("br",!0);class Ot extends bt{constructor(t,e,i="",r=null){if(super(),this.rawAttrs=i,this.parentNode=r,this.classNames=[],this.nodeType=vt.ELEMENT_NODE,this.rawTagName=t,this.rawAttrs=i||"",this.parentNode=r||null,this.childNodes=[],e.id&&(this.id=e.id,i||(this.rawAttrs=`id="${e.id}"`)),e.class&&(this.classNames=e.class.split(/\s+/),!i)){const t=`class="${this.classNames.join(" ")}"`;this.rawAttrs?this.rawAttrs+=` ${t}`:this.rawAttrs=t}}remove(){if(this.parentNode){const t=this.parentNode.childNodes;this.parentNode.childNodes=t.filter((t=>this!==t))}}removeChild(t){this.childNodes=this.childNodes.filter((e=>e!==t))}exchangeChild(t,e){const i=this.childNodes;this.childNodes=i.map((i=>i===t?e:i))}get tagName(){return this.rawTagName?this.rawTagName.toUpperCase():this.rawTagName}get rawText(){return this.childNodes.reduce(((t,e)=>t+e.rawText),"")}get text(){return Et.decode(this.rawText)}get structuredText(){let t=[];const e=[t];return function i(r){if(r.nodeType===vt.ELEMENT_NODE)It.get(r.rawTagName)?(t.length>0&&e.push(t=[]),r.childNodes.forEach(i),t.length>0&&e.push(t=[])):r.childNodes.forEach(i);else if(r.nodeType===vt.TEXT_NODE)if(r.isWhitespace)t.prependWhitespace=!0;else{let e=r.text;t.prependWhitespace&&(e=` ${e}`,t.prependWhitespace=!1),t.push(e)}}(this),e.map((t=>t.join("").trim().replace(/\s{2,}/g," "))).join("\n").replace(/\s+$/,"")}toString(){const t=this.rawTagName;if(t){const e=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i.test(t),i=this.rawAttrs?` ${this.rawAttrs}`:"";return e?`<${t}${i}>`:`<${t}${i}>${this.innerHTML}</${t}>`}return this.innerHTML}get innerHTML(){return this.childNodes.map((t=>t.toString())).join("")}set_content(t,e={}){if(t instanceof bt)t=[t];else if("string"==typeof t){const i=Bt(t,e);t=i.childNodes.length?i.childNodes:[new At(t)]}this.childNodes=t}get outerHTML(){return this.toString()}trimRight(t){for(let e=0;e<this.childNodes.length;e++){const i=this.childNodes[e];if(i.nodeType===vt.ELEMENT_NODE)i.trimRight(t);else{const r=i.rawText.search(t);r>-1&&(i.rawText=i.rawText.substr(0,r),this.childNodes.length=e+1)}}return this}get structure(){const t=[];let e=0;function i(i){t.push(" ".repeat(e)+i)}return function t(r){const s=r.id?`#${r.id}`:"",n=r.classNames.length?`.${r.classNames.join(".")}`:"";i(r.rawTagName+s+n),e++,r.childNodes.forEach((e=>{e.nodeType===vt.ELEMENT_NODE?t(e):e.nodeType===vt.TEXT_NODE&&(e.isWhitespace||i("#text"))})),e--}(this),t.join("\n")}removeWhitespace(){let t=0;return this.childNodes.forEach((e=>{if(e.nodeType===vt.TEXT_NODE){if(e.isWhitespace)return;e.rawText=e.rawText.trim()}else e.nodeType===vt.ELEMENT_NODE&&e.removeWhitespace();this.childNodes[t++]=e})),this.childNodes.length=t,this}querySelectorAll(t){let e;if(t instanceof Ct)e=t,e.reset();else{if(t.includes(",")){const e=t.split(",");return Array.from(e.reduce(((t,e)=>this.querySelectorAll(e.trim()).reduce(((t,e)=>t.add(e)),t)),new Set))}e=new Ct(t)}const i=[];return this.childNodes.reduce(((r,s)=>{for(i.push([s,0,!1]);i.length;){const s=Pt(i),n=s[0];if(0===s[1]){if(n.nodeType!==vt.ELEMENT_NODE){i.pop();continue}const o=n;if(s[2]=e.advance(o),s[2]&&e.matched){r.push(o),r.push(...o.querySelectorAll(t)),e.rewind(),i.pop();continue}}s[1]<n.childNodes.length?i.push([n.childNodes[s[1]++],0,!1]):(s[2]&&e.rewind(),i.pop())}return r}),[])}querySelector(t){let e;t instanceof Ct?(e=t,e.reset()):e=new Ct(t);const i=[];for(const t of this.childNodes)for(i.push([t,0,!1]);i.length;){const t=Pt(i),r=t[0];if(0===t[1]){if(r.nodeType!==vt.ELEMENT_NODE){i.pop();continue}if(t[2]=e.advance(r),t[2]&&e.matched)return r}t[1]<r.childNodes.length?i.push([r.childNodes[t[1]++],0,!1]):(t[2]&&e.rewind(),i.pop())}return null}appendChild(t){return this.childNodes.push(t),t instanceof Ot&&(t.parentNode=this),t}get firstChild(){return this.childNodes[0]}get lastChild(){return Pt(this.childNodes)}get attributes(){if(this._attrs)return this._attrs;this._attrs={};const t=this.rawAttributes;for(const e in t){const i=t[e]||"";this._attrs[e]=Et.decode(i)}return this._attrs}get rawAttributes(){if(this._rawAttrs)return this._rawAttrs;const t={};if(this.rawAttrs){const e=/\b([a-z][a-z0-9-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/gi;let i;for(;i=e.exec(this.rawAttrs);)t[i[1]]=i[2]||i[3]||i[4]||null}return this._rawAttrs=t,t}removeAttribute(t){const e=this.rawAttributes;delete e[t],this._attrs&&delete this._attrs[t],this.rawAttrs=Object.keys(e).map((t=>{const i=JSON.stringify(e[t]);return void 0===i||"null"===i?t:`${t}=${i}`})).join(" ")}hasAttribute(t){return t in this.attributes}getAttribute(t){return this.attributes[t]}setAttribute(t,e){if(arguments.length<2)throw new Error("Failed to execute 'setAttribute' on 'Element'");const i=this.rawAttributes;i[t]=String(e),this._attrs&&(this._attrs[t]=Et.decode(i[t])),this.rawAttrs=Object.keys(i).map((t=>{const e=JSON.stringify(i[t]);return"null"===e||'""'===e?t:`${t}=${e}`})).join(" ")}setAttributes(t){this._attrs&&delete this._attrs,this._rawAttrs&&delete this._rawAttrs,this.rawAttrs=Object.keys(t).map((e=>{const i=t[e];return"null"===i||'""'===i?e:`${e}=${JSON.stringify(String(i))}`})).join(" ")}insertAdjacentHTML(t,e){if(arguments.length<2)throw new Error("2 arguments required");const i=Bt(e);if("afterend"===t){const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t+1,0,...i.childNodes),i.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=this.parentNode)}))}else if("afterbegin"===t)this.childNodes.unshift(...i.childNodes);else if("beforeend"===t)i.childNodes.forEach((t=>{this.appendChild(t)}));else{if("beforebegin"!==t)throw new Error(`The value provided ('${t}') is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'`);{const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t,0,...i.childNodes),i.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=this.parentNode)}))}}}get nextSibling(){if(this.parentNode){const t=this.parentNode.childNodes;let e=0;for(;e<t.length;){if(this===t[e++])return t[e]||null}return null}}get nextElementSibling(){if(this.parentNode){const t=this.parentNode.childNodes;let e=0,i=!1;for(;e<t.length;){const r=t[e++];if(i){if(r instanceof Ot)return r||null}else this===r&&(i=!0)}return null}}}const Nt=/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)\s*([^>]*?)(\/?)>/gi,Lt=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/gi,Mt={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},Ft={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},kt={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},Rt="documentfragmentcontainer";function Bt(t,e={lowerCaseTagName:!1,comment:!1}){const i=e.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},r=Object.keys(i),s=r.map((t=>new RegExp(t,"i"))),n=r.filter((t=>i[t])).map((t=>new RegExp(t,"i")));function o(t){return n.some((e=>e.test(t)))}function a(t){return s.some((e=>e.test(t)))}const l=new Ot(null,{});let h=l;const c=[l];let u,p=-1;for(t=`<${Rt}>${t}</${Rt}>`;u=Nt.exec(t);){if(p>-1&&p+u[0].length<Nt.lastIndex){const e=t.substring(p,Nt.lastIndex-u[0].length);h.appendChild(new At(e))}if(p=Nt.lastIndex,u[2]!==Rt)if("!"!==u[0][1]){if(e.lowerCaseTagName&&(u[2]=u[2].toLowerCase()),!u[1]){const i={};for(let t;t=Lt.exec(u[3]);)i[t[2].toLowerCase()]=t[4]||t[5]||t[6];const r=h.rawTagName;if(!u[4]&&Ft[r]&&Ft[r][u[2]]&&(c.pop(),h=Pt(c)),h=h.appendChild(new Ot(u[2],i,u[3])),c.push(h),a(u[2])){const i=`</${u[2]}>`,r=e.lowerCaseTagName?t.toLocaleLowerCase().indexOf(i,Nt.lastIndex):t.indexOf(i,Nt.lastIndex);if(o(u[2])){let e;e=-1===r?t.substr(Nt.lastIndex):t.substring(Nt.lastIndex,r),e.length>0&&h.appendChild(new At(e))}-1===r?p=Nt.lastIndex=t.length+1:(p=Nt.lastIndex=r+i.length,u[1]="true")}}if(u[1]||u[4]||Mt[u[2]])for(;;){if(h.rawTagName===u[2]){c.pop(),h=Pt(c);break}{const t=h.tagName;if(kt[t]&&kt[t][u[2]]){c.pop(),h=Pt(c);continue}break}}}else if(e.comment){const e=t.substring(p-3,p-u[0].length+4);h.appendChild(new xt(e))}}const d=Boolean(1===c.length);if(!e.noFix){const t=l;for(t.valid=d;c.length>1;){const t=c.pop(),e=Pt(c);t.parentNode&&t.parentNode.parentNode&&(t.parentNode===e&&t.tagName===e.tagName?(e.removeChild(t),t.childNodes.forEach((t=>{e.parentNode.appendChild(t)})),c.pop()):(e.removeChild(t),t.childNodes.forEach((t=>{e.appendChild(t)}))))}return t.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=null)})),t}const _=new At(t);return _.valid=d,_}var qt=[{test:/\>/g,replace:">"}],Ut=function(){function t(){}return t.get=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.processHTML=function(t,e){e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/"/g,'"')).replace(/&/g,"&")).replace(/'/g,"'")).replace(new RegExp(" ","g")," ")).replace(new RegExp("â","g"),String.fromCharCode(8730))).replace(new RegExp("Ã","g"),String.fromCharCode(215))).replace(new RegExp("<\\\\","g"),"</")).replace(new RegExp("<br>","g"),"<br/>")).replace(new RegExp("<BR>","g"),"<br/>")).replace(new RegExp("<BR/>","g"),"<br/>")).replace(new RegExp("<B","g"),"<b")).replace(new RegExp("</B>","g"),"</b>")).replace(new RegExp("<I","g"),"<i")).replace(new RegExp("</I>","g"),"</i>")).replace(new RegExp("<P","g"),"<p")).replace(new RegExp("</P>","g"),"</p>")).replace(new RegExp("<U","g"),"<u")).replace(new RegExp("</U>","g"),"</u>")).replace(new RegExp("<LI","g"),"<li")).replace(new RegExp("</LI>","g"),"</li>")).replace(new RegExp("<FONT","g"),"<font")).replace(new RegExp("</FONT>","g"),"</font>")).replace(new RegExp("& ","g"),"& ");for(var i=0,r=[],s=[],n=[];i<e.length;)if("<"==e[i]){if("p"==e[i+1])r[r.length]="p";else if("b"==e[i+1]&&"r"!=e[i+2])r[r.length]="b";else if("i"==e[i+1])r[r.length]="i";else if("u"==e[i+1])r[r.length]="u";else if("f"==e[i+1]&&"o"==e[i+2]&&"n"==e[i+3]&&"t"==e[i+4])r[r.length]="font",i+=2;else if("l"==e[i+1]&&"i"==e[i+2])r[r.length]="li",i++;else if("/"==e[i+1]&&"p"==e[i+2]){for(var o=r.length,a=-1;o>0;)if("p"==r[--o]){a=o;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(o=r.length-1;o>a;)s[s.length]=i,n[n.length]="</"+r[o]+">",r.pop(),o--;r.pop()}}else if("/"==e[i+1]&&"b"==e[i+2]){var l=r.length;for(a=-1;l>0;)if("b"==r[--l]){a=l;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(l=r.length-1;l>a;)s[s.length]=i,n[n.length]="</"+r[l]+">",r.pop(),l--;r.pop()}}else if("/"==e[i+1]&&"i"==e[i+2]){var h=r.length;for(a=-1;h>0;)if("i"==r[--h]){a=h;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(h=r.length-1;h>a;)s[s.length]=i,n[n.length]="</"+r[h]+">",r.pop(),h--;r.pop()}}else if("/"==e[i+1]&&"u"==e[i+2]){var c=r.length;for(a=-1;c>0;)if("u"==r[--c]){a=c;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(c=r.length-1;c>a;)s[s.length]=i,n[n.length]="</"+r[c]+">",r.pop(),c--;r.pop()}}else if("/"==e[i+1]&&"l"==e[i+2]&&"i"==e[i+3]){var u=r.length;for(a=-1;u>0;)if("li"==r[--u]){a=u;break}if(a<0)s[s.length]=i,n[n.length]=7;else{for(u=r.length-1;u>a;)s[s.length]=i,n[n.length]="</"+r[u]+">",r.pop(),u--;r.pop()}}else if("/"==e[i+1]&&"f"==e[i+2]&&"o"==e[i+3]&&"n"==e[i+4]&&"t"==e[i+5]){var p=r.length;for(a=-1;p>0;)if("font"==r[--p]){a=p;break}if(a<0)s[s.length]=i,n[n.length]=7;else{for(p=r.length-1;p>a;)s[s.length]=i,n[n.length]="</"+r[p]+">",r.pop(),p--;r.pop()}}i++}else i++;for(var d=r.length;d>0;)d--,s[s.length]=i,n[n.length]="</"+r[d]+">";for(var _=0,f=n.length,g=0;g<f;g++)"number"==typeof n[g]?(e=e.slice(0,s[g]+_)+e.slice(s[g]+_+n[g]),_-=n[g]):(e=e.slice(0,s[g]+_)+n[g]+e.slice(s[g]+_),_+=n[g].length);var m={text:""},y=t.newTextFormat;t._textFormats=[y],t._textFormatsIdx=[0];var b=Bt(e);return b&&b.firstChild&&(m.multiline=b.firstChild.childNodes.length>0,this.readHTMLTextPropertiesRecursive(t,b,m,y)),""==m.text||13!=m.text.charCodeAt(m.text.length-1)&&10!=m.text.charCodeAt(m.text.length-1)||(m.text=m.text.slice(0,m.text.length-1)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),t._textFormatsIdx[t._textFormatsIdx.length-1]=m.text.length,m.text},t.prototype.readHTMLTextPropertiesRecursive=function(t,e,i,r){var s=[],n=[];if(e.attributes){if(e.attributes.size||e.attributes.SIZE)o=(o=e.attributes.size?e.attributes.size:e.attributes.SIZE).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="size";if(e.attributes.color||e.attributes.COLOR)o=(o=e.attributes.color?e.attributes.color:e.attributes.COLOR).replace("#","0x"),s[s.length]=parseInt(o),n[n.length]="color";if(e.attributes.indent||e.attributes.INDENT)o=(o=e.attributes.indent?e.attributes.indent:e.attributes.INDENT).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="indent";if(e.attributes.leftMargin||e.attributes.LEFTMARGIN)o=(o=e.attributes.leftMargin?e.attributes.leftMargin:e.attributes.LEFTMARGIN).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="leftMargin";if(e.attributes.rightMargin||e.attributes.RIGHTMARGIN)o=(o=e.attributes.rightMargin?e.attributes.rightMargin:e.attributes.RIGHTMARGIN).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="rightMargin";if(e.attributes.align||e.attributes.ALIGN){var o=e.attributes.align?e.attributes.align:e.attributes.ALIGN;s[s.length]=o,n[n.length]="align"}if(e.attributes.face||e.attributes.FACE){o=e.attributes.face?e.attributes.face:e.attributes.FACE;s[s.length]=o,n[n.length]="font_name"}}"b"==e.tagName||"b"==e.rawTagName?r.bold||(s[s.length]=!0,n[n.length]="bold"):"i"==e.tagName||"i"==e.rawTagName?r.italic||(s[s.length]=!0,n[n.length]="italic"):"u"==e.tagName||"u"==e.rawTagName?r.underline||(s[s.length]=!0,n[n.length]="underline"):"font"==e.tagName||"font"==e.rawTagName||("li"==e.tagName||"li"==e.rawTagName?i.text+="\n ● ":("br"!=e.tagName&&"br"!=e.rawTagName||!t.multiline)&&("sbr"!=e.tagName&&"sbr"!=e.rawTagName||!t.multiline)||(i.text+="\n"));for(var a=!1,l=s.length;l>0;)if(r[n[--l]]!=s[l]){a=!0;break}var h=r;if(a){for(h=r.clone(),l=s.length;l>0;)h[n[--l]]=s[l];t._textFormats.push(h),t._textFormatsIdx[t._textFormatsIdx.length-1]=i.text.length,t._textFormatsIdx.push(i.text.length)}if(e.childNodes&&e.childNodes.length>0)for(var c=0;c<e.childNodes.length;c++)t._textFormats[t._textFormats.length-1]!=h&&(t._textFormats.push(h),t._textFormatsIdx[t._textFormatsIdx.length-1]=i.text.length,t._textFormatsIdx.push(i.text.length)),this.readHTMLTextPropertiesRecursive(t,e.childNodes[c],i,h);else if(""!=e.text.replace(/[\s\r\n]/gi,"")){for(var u=e.text,p=0,d=qt;p<d.length;p++){var _=d[p];u=u.replace(_.test,_.replace)}i.text+=u}"ul"==e.tagName||"ul"==e.rawTagName||"li"==e.tagName||"li"==e.rawTagName||"p"!=e.tagName&&"p"!=e.rawTagName||(i.text+="\n")},t}(),Vt=function(){function t(t){void 0===t&&(t=40),this.index=-1,this.store=Array.from({length:t},(function(t){return{x:1/0,y:1/0,start:0,width:0,len:0}}))}return t.prototype.put=function(t,e,i,r,s){this.index++;var n=this.store[this.index]||(this.store[this.index]={});return n.start=t,n.x=e,n.y=i,n.width=r,n.len=s,n},Object.defineProperty(t.prototype,"last",{get:function(){return this.store[this.index]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.index+1},set:function(t){this.index=t-1},enumerable:!1,configurable:!0}),t.prototype.get=function(t){return this.store[t]},t.prototype.free=function(){this.index=-1},t.prototype.dispose=function(){this.store=null,this.index=0},t}(),jt=[{test:/'/g,replace:"'"},{test:/>/g,replace:">"}],Ht=function(t){function r(){var i=t.call(this)||this;return i.textOffsetX=0,i.textOffsetY=0,i._selectionBeginIndex=0,i._selectionEndIndex=0,i._biggestLine=0,i._iText="",i._iTextDiffStart=0,i._text="",i._iTextWoLineBreaks="",i._newTextFormat=new dt,i.cursorIntervalID=-1,i.chars_codes=[],i.chars_width=[],i.tf_per_char=[],i.words=new Vt(10),i._textRuns_formats=[],i._textRuns_words=[],i._paragraph_textRuns_indices=[],i._maxWidthLine=0,i._labelData=null,i.lines_wordStartIndices=[],i.lines_wordEndIndices=[],i.lines_start_y=[],i.lines_start_x=[],i.lines_charIdx_start=[],i.lines_charIdx_end=[],i.lines_width=[],i.lines_height=[],i.lines_numSpacesPerline=[],i.char_positions_x=[],i.char_positions_y=[],i.sourceTextField=null,i._maskWidth=0,i._maskHeight=0,i._maskTextOffsetX=0,i._maskTextOffsetY=0,i.isStatic=!1,i._internalScale=new e.Vector3D(1,1,1),i.onKeyDelegate=function(t){return i.onKey(t)},i.startSelectionByMouseDelegate=function(t){return i.startSelectionByMouse(t)},i.stopSelectionByMouseDelegate=function(t){return i.stopSelectionByMouse(t)},i.updateSelectionByMouseDelegate=function(t){return i.updateSelectionByMouse(t)},i._onClipboardPasteDelegate=function(t){return i.onClipboardPaste(t)},i.cursorIntervalID=-1,i._tabEnabled=!0,i.cursorType="",i.textOffsetX=0,i.textOffsetY=0,i.textShapes={},i._textColor=0,i._width=100,i._height=100,i._textWidth=0,i._textHeight=0,i._type=Z.DYNAMIC,i._selectable=!1,i._numLines=0,i.multiline=!1,i._autoSize=K.NONE,i._wordWrap=!1,i._background=!1,i._backgroundColor=16777215,i._border=!1,i._borderColor=0,i.html=!1,i.maxChars=0,i._selectionBeginIndex=0,i._selectionEndIndex=0,i._scrollH=0,i._scrollV=0,i._textFormats=[],i._graphics=s.Graphics.getGraphics(),i._graphics.addOwner(i),i.mouseEnabled=i._selectable,i}return l(r,t),r.getNewTextField=function(){return r._textFields.length?r._textFields.pop():new r},r.clearPool=function(){r._textFields=[]},r.prototype.updateMaskMode=function(){this.inMaskMode&&(this._maskWidth==this._width&&this._maskHeight==this._height&&this._maskTextOffsetX==this.textOffsetX&&this._maskTextOffsetY==this.textOffsetY||(this._maskWidth=this._width,this._maskHeight=this._height,this._maskTextOffsetX=this.textOffsetX,this._maskTextOffsetY=this.textOffsetY,this.maskChild.graphics.clear(),this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill()),this._graphics.clear()),this.inMaskMode||(this.inMaskMode=!0,this.maskChild||(this.maskChild=new y),this.textChild||(this.textChild=new mt),this.textChild.mouseEnabled=!1,this.textChild.parentTextField=this,this.maskChild.mouseEnabled=!1,this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill(),this.addChild(this.maskChild),this.addChild(this.textChild),this.maskChild.visible=!1,this._graphics.clear(),this.targetGraphics=this.textChild.graphics),this._textWidth>this._width||this._textHeight>this._height?this.textChild.mask=this.maskChild:this.textChild.mask=void 0},r.prototype.getMouseCursor=function(){return this.cursorType},Object.defineProperty(r.prototype,"isInFocus",{get:function(){return this._isInFocus},set:function(t){},enumerable:!1,configurable:!0}),r.prototype.setFocus=function(e,i,r){void 0===i&&(i=!1),void 0===r&&(r=!0),this._isInFocus!=e&&(t.prototype.setFocus.call(this,e,i,r),this.enableInput(e),this._selectable&&(this.setSelection(0,0),this._glyphsDirty=!0,this.invalidate()))},r.prototype.enableInput=function(t){if(void 0===t&&(t=!0),this.cursorIntervalID>=0&&(window.clearInterval(this.cursorIntervalID),this.cursorIntervalID=-1),t&&this._isInFocus&&this.selectable){this.drawSelectionGraphics();var e=this;this.cursorIntervalID=window.setInterval((function(){e.cursorBlinking=!e.cursorBlinking,e.selectable||(e.cursorBlinking=!0),e._shapesDirty=!0,e.invalidate()}),500)}},r.prototype.findCharIdxForMouse=function(t){var i=new e.Point(t.position.x,t.position.y),r=this.getLineIndexAtPoint(i.x,i.y),s=this.getCharIndexAtPoint(i.x,i.y,r);return r>=this.lines_start_x.length&&(r=this.lines_start_x.length-1),r<0&&(r=0),r>=0&&s<0&&void 0!==this.lines_start_x[r]&&(s=i.x<=this.lines_start_x[r]?this.lines_charIdx_start[r]:this.lines_charIdx_end[r]),(r<0||s<0)&&(s=0),s},r.prototype.startSelectionByMouse=function(t){this._selectionBeginIndex=this.findCharIdxForMouse(t),this._selectionEndIndex=this._selectionBeginIndex,this.cursorShape&&this.cursorShape.invalidate(),this.cursorShape=void 0,this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this._shapesDirty=!0,this._textShapesDirty=!0,this.cursorBlinking=!1,this.drawSelectionGraphics()},r.prototype.stopSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},r.prototype.updateSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},r.prototype.drawSelectionGraphics=function(){this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length),this._selectionEndIndex<0&&(this._selectionEndIndex=0),this._selectionEndIndex>this.char_positions_x.length&&(this._selectionEndIndex=this.char_positions_x.length),this._selectionBeginIndex===this._selectionEndIndex?(this.showSelection=!1,this.drawCursor()):(this.showSelection=!0,this.cursorBlinking=!0,this.drawSelectedBG())},r.prototype.scrollToCursor=function(t,e){},r.prototype.drawCursor=function(){if(this._shapesDirty=!0,!this.cursorBlinking&&this.selectable&&this.selectionBeginIndex===this.selectionEndIndex){var t=0,i=0,r=this._newTextFormat;0==this.char_positions_x.length?(t=this.textOffsetX+this._width/2+this._textWidth/2,"justify"==r.align||"center"==r.align||("right"==r.align?t=this.textOffsetX+this._width-2:"left"==r.align&&(t=this.textOffsetX+4+this._textWidth))):this._selectionBeginIndex==this.char_positions_x.length?(t=this.char_positions_x[this._selectionBeginIndex-1]+this.chars_width[this._selectionBeginIndex-1],i=this.char_positions_y[this._selectionBeginIndex-1],r=this.tf_per_char[this._selectionBeginIndex-1]):(t=this.char_positions_x[this._selectionBeginIndex],i=this.char_positions_y[this._selectionBeginIndex],r=this.tf_per_char[this._selectionBeginIndex]),r.font_table.initFontSize(r.size);var o=r.font_table.getLineHeight(),a=this.getTextColorForTextFormat(r),l=this.internalScale.x;l<=0&&(l=1);var h=[t-.5*l,i,l,o];if(this.cursorShape?s.GraphicsFactoryHelper.updateRectanglesShape(this.cursorShape,h):(this.cursorShape=s.GraphicsFactoryHelper.drawRectangles(h,a,1),this.cursorShape.usages++),this.cursorShape.style.color!==a){var c=new s.SolidFillStyle(a,e.ColorUtils.float32ColorToARGB(a)[0]/255||1),u=s.MaterialManager.getMaterialForColor(c),p=this.cursorShape;p.material=u,u.getNumTextures()&&(p.style=new n.Style,p.style.image=s.TextureAtlas.getTextureForColor(c),p.style.uvMatrix=c.getUVMatrix())}this.scrollToCursor(t,i)}},r.prototype.drawSelectedBG=function(){this._shapesDirty=!0,this._textShapesDirty=!0,this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length);var t=this._selectionBeginIndex,e=this._selectionEndIndex;this._selectionEndIndex<this._selectionBeginIndex&&(t=this._selectionEndIndex,e=this._selectionBeginIndex);var i=0,r=0,n=-1,o=null,a=-1,l=0,h=0,c=[];if(0!=this.char_positions_x.length&&this._selectionEndIndex!=this._selectionBeginIndex)for(var u=e>this.char_positions_x.length?this.char_positions_x.length:e,p=t;p<u;p++)p==this.char_positions_x.length?(i=this.char_positions_x[p-1]+this.chars_width[p-1],r=this.char_positions_y[p-1],o=this.tf_per_char[p-1]):(i=this.char_positions_x[p],r=this.char_positions_y[p],o=this.tf_per_char[p]),a<0&&(a=i),n>=0&&n!=r&&(c.push(a,n,l,h),l=0,a=i),l+=this.chars_width[p],n=r,o.font_table.initFontSize(o.size),h=Math.max(h,o.font_table.getLineHeight());if(l>0)return c.push(a,n,l,h),void(this.bgShapeSelect?s.GraphicsFactoryHelper.updateRectanglesShape(this.bgShapeSelect,c):(this.bgShapeSelect=s.GraphicsFactoryHelper.drawRectangles(c,0,1),this.bgShapeSelect.usages++));this.scrollToCursor(a+l,n+h)},r.prototype.drawBG=function(){this._background&&(this._graphics.beginFill(this.backgroundColor,1),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this.width,this.height),this._graphics.endFill());var t=this.pickObject;t||(this.pickObject=t||(t=new y),t.pickObjectFromTimeline=!0);var e=t.graphics;e.clear(),e.beginFill(0,1),e.drawRect(this.textOffsetX,this.textOffsetY,this.width,this.height),e.endFill()},r.prototype.drawBorder=function(){var t=this.border?.25*this.internalScale.x:0,e=this.border?.25*this.internalScale.y:0;this._graphics.beginFill(this._borderColor,1),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+this._height-2*e,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.drawRect(this.textOffsetX+this._width-2*t,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.endFill()},r.prototype.getTextShapeForIdentifierAndFormat=function(t,e){return this.textShapes[t]?this.textShapes[t]:this.textShapes[t]=new yt(e,t)},Object.defineProperty(r.prototype,"autoSize",{get:function(){return this._autoSize},set:function(t){if(this._autoSize!=t){if("string"==typeof t){if(t!=K.CENTER&&t!=K.NONE&&t!=K.LEFT&&t!=K.RIGHT)return}else"boolean"==typeof t&&(t=t?K.LEFT:K.NONE),"number"==typeof t&&(t=t>0?K.LEFT:K.NONE);this._autoSize=t,this._positionsDirty=!0,this._autoSize!=K.NONE&&this.invalidate()}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"internalScale",{get:function(){return this._internalScale},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"background",{get:function(){return this._background},set:function(t){this._background!=t&&(this._background=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._shapesDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"border",{get:function(){return this._border},set:function(t){t!=this._border&&(this._border=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"borderColor",{get:function(){return this._borderColor},set:function(t){t!=this.borderColor&&(this._borderColor=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottomScrollV",{get:function(){return this._bottomScrollV},set:function(t){t!=this._bottomScrollV&&(this._bottomScrollV=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"caretIndex",{get:function(){return this._caretIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._autoSize!=K.NONE&&this.reConstruct(),this._height},set:function(t){this._height!=t&&this._autoSize==K.NONE&&(this._height=t,this._positionsDirty=!0,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"htmlText",{get:function(){return this._htmlText},set:function(t){if((t=null==t?"":t.toString())!=this._htmlText){this._htmlText=t;var e=Ut.get().processHTML(this,t);this._labelData=null,this._text=e,this._iText=e,this._iTextWoLineBreaks=e.replace(/(\r\n|\n|\\n|\r)/gm,""),this._textDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"length",{get:function(){return this._iText.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxScrollH",{get:function(){return this.reConstruct(),this._maxScrollH},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxScrollV",{get:function(){return this.reConstruct(),this._maxScrollV},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numLines",{get:function(){return this.reConstruct(),this._numLines},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"restrict",{get:function(){return this._restrict},set:function(t){t!=this._restrict&&(this._restrict=t,this._restrictRegex=null,void 0!==t&&((t=t.toString()).length>=2&&"-"==t[0]&&!isNaN(parseInt(t[1]))&&(t="0"+t),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"")).replace(/\^/g,"")).replace(/([^a-zA-Z0-9])\-/g,"$1\\-")).replace(/\./g,"\\.")).replace(/\</g,"\\<")).replace(/\>/g,"\\>")).replace(/\+/g,"\\+")).replace(/\*/g,"\\*")).replace(/\?/g,"\\?")).replace(/\[/g,"\\[")).replace(/\]/g,"\\]")).replace(/\$/g,"\\$")).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")).replace(/\{/g,"\\{")).replace(/\}/g,"\\}")).replace(/\=/g,"\\=")).replace(/\!/g,"\\!")).replace(/\:/g,"\\:")).replace(/\|/g,"\\|")).replace(/\//g,"\\/")).replace(/\%/g,"\\%"),this._restrictRegex=new RegExp("[^"+t+"]","g")))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scrollH",{get:function(){return this._scrollH},set:function(t){t!=this._scrollH&&(this._scrollH=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scrollV",{get:function(){return this._scrollV},set:function(t){var e=Math.round(t);e!==this._scrollV&&(this._scrollV=e,this._scrollV>this._maxScrollV&&(this._scrollV=this._maxScrollV),this._scrollV<=0&&(this._scrollV=0),this.textChild&&(this.textChild.y=-this.lines_start_y[this._scrollV]))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this.selectable!=t&&(this._selectable=t,this.mouseEnabled=t,this.cursorType=t?"text":"",t?(this.addEventListener(q.DRAG_START,this.startSelectionByMouseDelegate),this.addEventListener(q.DRAG_STOP,this.stopSelectionByMouseDelegate),this.addEventListener(q.DRAG_MOVE,this.updateSelectionByMouseDelegate)):(this.removeEventListener(q.DRAG_START,this.startSelectionByMouseDelegate),this.removeEventListener(q.DRAG_STOP,this.stopSelectionByMouseDelegate),this.removeEventListener(q.DRAG_MOVE,this.updateSelectionByMouseDelegate)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectionBeginIndex",{get:function(){return this._selectionBeginIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectionEndIndex",{get:function(){return this._selectionEndIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"text",{get:function(){return this._text},set:function(t){if(t=(t=null==t?"":t.toString()).replace(String.fromCharCode(160)," "),this._text!=t||this._newFormatDirty){this._newFormatDirty=!1,this._labelData=null,this._text=t,""==t||13!=t.charCodeAt(t.length-1)&&10!=t.charCodeAt(t.length-1)||(t=t.slice(0,t.length-1)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&"\\"==t[t.length-3]&&(t=t.slice(0,t.length-3)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&(t=t.slice(0,t.length-2));for(var e=0,i=jt;e<i.length;e++){var r=i[e];t=t.replace(r.test,r.replace)}this._iText=t,this._iTextWoLineBreaks=t.replace(/(\r\n|\n|\\n|\r)/gm,""),this._textFormats=[this.newTextFormat],this._textFormatsIdx=[this._iText.length],this._textDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),r.prototype.setLabelData=function(t){this._labelData=t,this.isStatic=!0,this._iText="",this._iTextWoLineBreaks="",this._textDirty=!1,this._positionsDirty=!1,this._glyphsDirty=!0,this.invalidate()},Object.defineProperty(r.prototype,"newTextFormat",{get:function(){return this._newTextFormat.clone()},set:function(t){if(!t)throw new Error("TextField::: set newTextFormat - no value!");t.equal(this._newTextFormat)||(this._newTextFormat=t.clone(),this._newFormatDirty=!0,this._textShapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleX",{get:function(){return this._transform.scale.x},set:function(t){this._transform.scale.x!=t&&this._setScaleX(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleY",{get:function(){return this._transform.scale.y},set:function(t){this._transform.scale.y!=t&&this._setScaleY(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textColor",{get:function(){return this._textColor},set:function(t){if(this._textColor!=t){if(this._textColor=t,this._textFormats){for(var e=this._textFormats.length;e>0;)e--,this._textFormats[e]&&(this._textFormats[e].color=t);this._textDirty=!0}this._glyphsDirty=!0,this._textShapesDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),r.prototype.getTextColorForTextFormat=function(t){return t.hasPropertySet("color")?t.color:this._textColor},Object.defineProperty(r.prototype,"textInteractionMode",{get:function(){return this._textInteractionMode},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textWidth",{get:function(){return this.reConstruct(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textHeight",{get:function(){return this.reConstruct(),this.type==Z.INPUT&&""==this._iText?(this._newTextFormat.font_table.initFontSize(this._newTextFormat.size),this._newTextFormat.font_table.getLineHeight()):this._textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this._type},set:function(t){this._type!=t&&(this._type=t,this._textDirty=!0,t==Z.INPUT?(this.enableInput(!0),this.addEventListener(ft.KEYDOWN,this.onKeyDelegate)):(this.enableInput(!1),this.removeEventListener(ft.KEYDOWN,this.onKeyDelegate)),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"x",{get:function(){return this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x},set:function(t){this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x!=t&&(this._transform.matrix3D._rawData[12]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._width},set:function(t){this._width!=t&&(this._width=t,this._positionsDirty=!0,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!=t&&(this._wordWrap=t,this._positionsDirty=!0,t||this.invalidate())},enumerable:!1,configurable:!0}),r.prototype.advanceFrame=function(){},r.prototype.getEntity=function(){return this.reConstruct(!0),this._graphics},r.prototype.clear=function(){t.prototype.clear.call(this)},r.prototype.dispose=function(){this.disposeValues(),r._textFields.push(this)},r.prototype.disposeValues=function(){t.prototype.disposeValues.call(this),this.maskChild&&(this.maskChild.dispose(),this.maskChild=null),this.textChild&&(this.textChild.dispose(),this.textChild=null),this.cursorShape&&(this.cursorShape.dispose(),this.cursorShape=null),this.bgShapeSelect&&(this.bgShapeSelect.dispose(),this.bgShapeSelect=null),this._labelData&&(this._labelData=null),this._resetParagraph(),this._clearTextShapes()},r.prototype.reConstruct=function(t){void 0===t&&(t=!1),(this._textDirty||this._positionsDirty||this._glyphsDirty||this._shapesDirty)&&(this._textDirty&&(this._positionsDirty=!0,this._lastWordsCount=this.words.length,this.char_positions_x.length=0,this.char_positions_y.length=0,this.words.length=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this._maxScrollH=0,this._maxScrollV=0,this._maxWidthLine=0,this.buildParagraphs()),this._positionsDirty&&(this._glyphsDirty=!0,""!=this._iText&&null!=this._textFormats[0]?this.getWordPositions(this._textFormats[0]):(this._textWidth=0,this._textHeight=0,this._autoSize!=K.NONE&&(this.wordWrap||this.adjustPositionForAutoSize(0),this._height=4,this._type==Z.INPUT&&(this._newTextFormat.font_table.initFontSize(this._newTextFormat.size),this._height=this._newTextFormat.font_table.getLineHeight()+4)),this._type==Z.INPUT&&this.drawSelectionGraphics()),this.updateMaskMode()),this._textDirty=!1,this._positionsDirty=!1,t&&(this._glyphsDirty&&(this._labelData?this.buildGlyphsForLabelData():this.buildGlyphs()),this._glyphsDirty=!1,this._labelData||(this.buildShapes(),this._shapesDirty=!1)))},r.prototype.reset=function(){t.prototype.reset.call(this),this.sourceTextField&&this.sourceTextField.copyTo(this)},r.prototype.onClipboardPaste=function(t){var e=(t.clipboardData||self.clipboardData).getData("text");e&&(t.preventDefault(),this._selectionBeginIndex>0||this._selectionEndIndex>this.length?this._insertNewText(e):this.text=e)},r.prototype._resetParagraph=function(){this._textShapesDirty=this._textShapesDirty||this.chars_codes.length>0,this.tf_per_char.length=0,this.chars_width.length=0,this.chars_codes.length=0,this._paragraph_textRuns_indices.length=0,this._textRuns_formats.length=0,this._textRuns_words.length=0},r.prototype.buildParagraphs=function(){if(this._textDirty)if(""!==this._iText&&this._textFormats[0]){var t=0,e=0,i=0,r=0,s=0,n=0,o=0,a=this._iText,l=this._textFormatsIdx.length,h=this._paragraph_textRuns_indices,c=this._textRuns_formats,u=this._textRuns_words,p=this.chars_codes,d=this.tf_per_char,_=this.chars_width,f=function(e){h[t]=e,t++},g=function(t,i){return void 0===i&&(i=!1),i&&f(e),c[e++]=t,t},m=function(t){return u[i++]=t,t},y=function(t,e,i){s+=+(t!==p[r]),s+=+(e!==d[r]),s+=+(i!==_[r]),p[r]=t,d[r]=e,_[r]=i,r++};f(e);for(var b=0;b<l;b++){var v=0,x=0,w=!0,E=this._textFormats[b],A=this._width-(E.indent+E.leftMargin+E.rightMargin);E.font_table.initFontSize(E.size);var D=b===l-1?a.length:this._textFormatsIdx[b];if(D>o){g(E);for(var T=m({start:this.words.length,count:0,width:0,space:0}),S=o;S<D;S++){var C=a.charCodeAt(S),P=a.charCodeAt(S+1);if(13===C&&(C=10),92!==C||114!==P)if(92===C&&110===P&&(S+=1,C=10,P=a.charCodeAt(S+1)),10===C)T.count=v,T.width=n,T.space=x,g(E,!0),T=m({start:this.words.length,count:0,width:0,space:0}),w=!0,x=0,v=0,this._maxWidthLine<n&&(this._maxWidthLine=n),n=0;else{var I=E.font_table.getCharWidth(C.toString()),O=9==C||32==C;!O&&S<D-1&&9!=P&&32!=P&&(I+=E.letterSpacing),n+=I,y(C,E,I),O?(x++,this.words.put(r-1,0,0,I,1),v++,w=!0):(v>0&&this._autoSize==K.NONE&&this._wordWrap&&this.words.last.width+I>=A&&(w=!0),w?(this.words.put(r-1,0,0,I,1),v++):(this.words.last.width+=I,this.words.last.len+=1),w=!1)}else S+=1}T.count=v,T.width=n,T.space=x,this._maxWidthLine<n&&(this._maxWidthLine=n)}o=D}this._textShapesDirty=this._textShapesDirty||s>0||p.length!==r,h.length=t,u.length=i,c.length=e,p.length=r,d.length=r,_.length=r}else this._resetParagraph()},r.prototype.adjustPositionForAutoSize=function(t){var e=this._width;this._width=4+t,this._autoSize==K.RIGHT?(this._transform.matrix3D._rawData[12]-=this._width-e,this._transform.invalidatePosition()):this._autoSize==K.CENTER&&(this._transform.matrix3D._rawData[12]-=(this._width-e)/2,this._transform.invalidatePosition())},r.prototype.getWordPositions=function(t){var e,i=0,r=this._textRuns_formats.length,s=0,n=0,o=0,a=0,l=0;this._numLines=0;var h=0,c=0,u=0,p=this.textOffsetY+2;if(this._autoSize!=K.NONE&&!this._wordWrap&&this._textDirty){var d=this._maxWidthLine+t.indent+t.leftMargin+t.rightMargin;this.adjustPositionForAutoSize(d)}var _=this._width-(t.indent+t.leftMargin+t.rightMargin),f=0,g=this._paragraph_textRuns_indices.length;h=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0;var m=[],y=[];for(f=0;f<g;f++){for(r=f==g-1?this._textRuns_formats.length:this._paragraph_textRuns_indices[f+1],o=0,m[m.length]=0,i=this._paragraph_textRuns_indices[f];i<r;i++)(e=this._textRuns_formats[i]).font_table.initFontSize(e.size),m[m.length-1]<e.font_table.getLineHeight()+e.leading&&(m[m.length-1]=e.font_table.getLineHeight()+e.leading),n=this._textRuns_words[i].start+this._textRuns_words[i].count,o+=this._textRuns_words[i].width;this.lines_wordStartIndices[this.lines_wordStartIndices.length]=this._textRuns_words[this._paragraph_textRuns_indices[f]].start,this.lines_wordEndIndices[this.lines_wordEndIndices.length]=n,this.lines_width[this.lines_width.length]=0,this.lines_numSpacesPerline[this.lines_numSpacesPerline.length]=0;var b=0;for(this.lines_height[this.lines_height.length]=m[b],y[h]=e,i=this._paragraph_textRuns_indices[f];i<r;i++)if((e=this._textRuns_formats[i]).font_table.initFontSize(e.size),l=e.indent,n=this._textRuns_words[i].start+this._textRuns_words[i].count,o<=_||!this.wordWrap)for(s=this._textRuns_words[i].start;s<n;s+=1){c+=u=(L=this.words.get(s)).width,this.lines_wordEndIndices[h]=s+1,this.lines_width[h]+=u,y[h]=e,32!=this.chars_codes[L.start]&&9!=this.chars_codes[L.start]||(this.lines_numSpacesPerline[h]+=1)}else for(u=0,l=0,s=this._textRuns_words[i].start;s<n;s+=1){u=(L=this.words.get(s)).width;var v=!1;32!=this.chars_codes[L.start]&&9!=this.chars_codes[L.start]||(this.lines_numSpacesPerline[h]+=1,v=!0),v||this.lines_width[h]+u<=_-l-1*e.font_table.getCharWidth("32")||0==this.lines_width[h]?(this.lines_wordEndIndices[h]=s+1,this.lines_width[h]+=u,y[h]=e):(h++,this.lines_wordStartIndices[h]=s,this.lines_wordEndIndices[h]=s+1,this.lines_width[h]=u,this.lines_numSpacesPerline[h]=0,this.lines_height[this.lines_height.length]=m[b],y[h]=e,l=e.indent)}b++,h++}var x,w,E,A,D,T=this.textOffsetX,S=0,C=this.lines_wordStartIndices.length,P=0;for(this._biggestLine=0,this._numLines=C,D=0;D<C;D++){c=this.lines_width[D],w=this.lines_height[D],x=this.lines_wordStartIndices[D],E=this.lines_wordEndIndices[D],this.lines_numSpacesPerline[D],e=y[D],A=_-c,T=this.textOffsetX+e.leftMargin+e.indent,e.align==J.JUSTIFY?0!=D&&(T-=e.indent):e.align==J.CENTER?T+=A>0?A/2:2:e.align==J.RIGHT?T+=A>0?A-2:2:e.align==J.LEFT&&(T+=2);var I=0,O=T;this.lines_start_x[D]=T,this.lines_start_y[D]=p,this.lines_charIdx_start[D]=P;var N=0;for(s=x;s<E;s+=1){var L;(L=this.words.get(s)).x=T,O=0,I=(x=L.start)+L.len;var M=this.tf_per_char[x];M.font_table.initFontSize(M.size);var F=w-(M.font_table.getLineHeight()+M.leading);for(F=F>0?F-2:0,L.y=p+F,S=x;S<I;S++)this.char_positions_x[this.char_positions_x.length]=T+O,this.char_positions_y[this.char_positions_y.length]=p+F,O+=this.chars_width[S],P++;T+=O,N+=O}this.lines_charIdx_end[D]=P,p+=w,N>a&&(this._biggestLine=D,a=N)}if(this._textWidth=a,this._textHeight=p,this.autoSize!=K.NONE&&(this._height=this._textHeight+4),this._textWidth>this._width){x=this.lines_charIdx_start[this._biggestLine],S=this.lines_charIdx_end[this._biggestLine];for(var k=0;S>x;)if(S--,(k+=this.chars_width[S])>this._width){this._maxScrollH=S;break}}if(this._textHeight>this._height){var R=this.lines_height.length;for(k=4;R>0;)if(R--,(k+=this.lines_height[R])>this._height){this._maxScrollV=R+1;break}}},r.prototype.buildGlyphsForLabelData=function(){this._clearTextShapes();for(var t,r,o=[],a=[],l=[],h=[],c=this.staticMatrix.tx/20,u=this.staticMatrix.ty/20,p=0,d=0;d<this._labelData.records.length;d++){o[d]=new dt,a[d]=[],l[d]=[],(t=this._labelData.records[d]).font_table?o[d].font_table=t.font_table:d>0?o[d].font_table=o[d-1].font_table:console.log("error - no font for label"),t.fontHeight?o[d].size=t.fontHeight/20:d>0&&(o[d].size=o[d-1].size),t.color?o[d].color=e.ColorUtils.f32_RGBA_To_f32_ARGB(t.color):d>0&&(o[d].color=o[d-1].color),null!=t.moveY&&(p=u+=t.moveY/20-p),null!=t.moveX&&(c=this.staticMatrix.tx/20+t.moveX/20),h.push(c),h.push(u);for(var _=0;_<t.entries.length;_++)a[d][_]=t.entries[_].glyphIndex,l[d][_]=t.entries[_].advance/20,c+=l[d][_]}var f,g=0,m=o.length,y=0,b=0;for(g=0;g<m;g++)o[g].font_table.initFontSize(o[g].size),b+=(f=o[g].font_table.buildTextLineFromIndices(this,o[g],h[2*g],h[2*g+1],a[g],l[g])).y,y=f.x>y?f.x:y;for(var v in this._textWidth=y,this._textHeight=b,this.targetGraphics=this._graphics,this.targetGraphics.clear(),this.drawBG(),(this.border||!this._background&&this._type!=Z.INPUT)&&this.drawBorder(),this.textShapes){r=this.textShapes[v];for(var x=new i.Float2Attributes(r.length/2),w=new Float32Array(x.attributesBuffer.buffer),E=0,A=0,D=r.verts;A<D.length;A++){var T=D[A];w.set(T,E),E+=T.length}r.elements=new n.TriangleElements,r.elements.setPositions(x),r.elements.invalidate();var S=r.shape=this.targetGraphics.addShape(s.Shape.getShape(r.elements));if(S.deepHitCheck=!0,S.usages++,S.style=new n.Style,r.format.bitmap&&0==this._textColor)S.material=s.MaterialManager.getMaterialForBitmap(!0),S.style.image=this._textFormats[0].bitmap,S.style.uvMatrix=new e.Matrix(0,0,0,0,r.format.uv_values[0],r.format.uv_values[1]);else{var C=this.getTextColorForTextFormat(r.format),P=new s.SolidFillStyle(C,e.ColorUtils.float32ColorToARGB(C)[0]/255||1),I=s.MaterialManager.getMaterialForColor(P);S.material=I,I.getNumTextures()&&(S.style.image=s.TextureAtlas.getTextureForColor(P),S.style.uvMatrix=P.getUVMatrix())}}},r.prototype.buildGlyphs=function(){var t,r=this._textRuns_formats,o=this._textRuns_words,a=r.length;this._textShapesDirty&&this._clearTextShapes();for(var l=0;l<a;l++){var h=o[l];0!=h.count&&(r[l].font_table.initFontSize(r[l].size),f.USE_UNSAFE_FNT&&r[l].font_table.generateFNTData(null),r[l].font_table.fillTextRun(this,r[l],h.start,h.count))}for(var c in this.textShapes)if(0!==(t=this.textShapes[c]).length){for(var u=new i.Float2Attributes(t.length/2),p=new Float32Array(u.attributesBuffer.buffer),d=t.hasUV?new i.Float2Attributes(t.length/2):null,_=d?new Float32Array(d.attributesBuffer.buffer):null,g=0,m=0;m<t.verts.length;m++){var y=t.verts[m];p.set(y,g),_&&_.set(t.uvs[m],g),g+=y.length}if(t.length=0,t.addChunk(p,_),t.shape){var b=t.shape.elements;b.setPositions(p),_&&b.setUVs(_),b.invalidate(),u.dispose(),d&&d.dispose()}else{t.elements=new n.TriangleElements,t.elements.setPositions(u),d&&t.elements.setUVs(d),t.elements.invalidate();var v=t.shape=s.Shape.getShape(t.elements);if(v.deepHitCheck=!0,v.usages++,v.style=new n.Style,v.style.sampler=new i.ImageSampler(!1,!0,!0),t.fntBitmap)v.material=s.MaterialManager.getMaterialForBitmap(),v.style.image=t.fntBitmap;else if(t.format.bitmap&&0==this._textColor)v.material=s.MaterialManager.getMaterialForBitmap(!0),v.style.image=this._textFormats[0].bitmap,v.style.uvMatrix=new e.Matrix(0,0,0,0,t.format.uv_values[0],t.format.uv_values[1]);else{var x=this.getTextColorForTextFormat(t.format),w=new s.SolidFillStyle(x,e.ColorUtils.float32ColorToARGB(x)[0]/255||1),E=s.MaterialManager.getMaterialForColor(w);v.material=E,E.getNumTextures()&&(v.style.image=s.TextureAtlas.getTextureForColor(w),v.style.uvMatrix=w.getUVMatrix())}}}},r.prototype.buildShapes=function(){var t;for(var e in this.targetGraphics?this._graphics.clear():this.targetGraphics=this._graphics,this.targetGraphics.clear(),this.drawBG(),!this._border&&this._background||this.drawBorder(),this.drawSelectionGraphics(),this.bgShapeSelect&&this.isInFocus&&this.showSelection&&this.targetGraphics.addShape(this.bgShapeSelect),this.textShapes)(t=this.textShapes[e]).shape&&this.targetGraphics.addShape(t.shape);this.type===Z.INPUT&&this.isInFocus&&this.cursorShape&&!this.cursorBlinking&&this.targetGraphics.addShape(this.cursorShape)},r.prototype.appendText=function(t){t.length&&(this._iText+=t,this._textDirty=!0,this.invalidate())},r.prototype.closeParagraph=function(){this._iText+="\n",this._textDirty=!0,this.invalidate()},r.prototype.getCharBoundaries=function(t){var i=new e.Rectangle;return t>=this.char_positions_x.length||(i.x=this.char_positions_x[t],i.width=this.chars_width[t],i.y=this.char_positions_y[t],i.height=10),i},r.prototype.getCharIndexAtPoint=function(t,e,i){void 0===i&&(i=-1),i<0&&(i=this.getLineIndexAtPoint(t,e));for(var r=this.lines_charIdx_start[i],s=this.lines_charIdx_end[i],n=r;n<s;n++)if(t>=this.char_positions_x[n]){if(t<=this.char_positions_x[n]+this.chars_width[n]/2)return n;if(t<=this.char_positions_x[n]+this.chars_width[n])return n+1}return-1},r.prototype.getFirstCharInParagraph=function(t){return console.log("Textfield.getFirstCharInParagraph() not implemented"),this._firstCharInParagraph},r.prototype.getImageReference=function(t){return console.log("TextField.getImageReference() not implemented"),this._imageReference},r.prototype.getLineIndexAtPoint=function(t,e){for(var i=this.lines_start_y.length,r=0;r<i-1;r++)if(e>=this.lines_start_y[r]&&e<=this.lines_start_y[r+1])return r;return e>=this.lines_start_y[i-1]?i-1:0},r.prototype.getLineIndexOfChar=function(t){this.buildParagraphs();for(var e=this.lines_charIdx_start.length-1,i=void 0;i<e;i++)if(t>=this.lines_charIdx_start[i]&&t<=this.lines_charIdx_end[i+1])return i;return e},r.prototype.getLineLength=function(t){return 0==this.lines_width.length?0:t>=this.lines_width.length?this.lines_width[this.lines_width.length-1]:this.lines_width[t]},r.prototype.getLineMetrics=function(t){var e=new _t;return this.lines_width.length?(t>=this.lines_width.length&&(t=this.lines_width.length-1),e.x=this.lines_start_x[t],e.width=this.lines_width[t],e.height=this.lines_height[t],e):e},r.prototype.getLineOffset=function(t){return 0==this.lines_charIdx_start.length?0:t>=this.lines_charIdx_start.length?this.lines_charIdx_start[this.lines_charIdx_start.length-1]:this.lines_charIdx_start[t]},r.prototype.getLineText=function(t){return 0==this.lines_charIdx_start.length?"":(t>=this.lines_width.length&&(t=this.lines_width.length-1),this._iText.slice(this.lines_charIdx_start[t],this.lines_charIdx_end[t]))},r.prototype.getParagraphLength=function(t){return this._paragraphLength},r.prototype.getTextFormat=function(t,e){var i;if(void 0===t&&(t=-1),void 0===e&&(e=-1),!this.tf_per_char||!this.tf_per_char.length)return(null===(i=this._textFormats[0])||void 0===i?void 0:i.clone())||new dt;t<0&&(t=0),e>this.tf_per_char.length&&(e=this.tf_per_char.length);for(var r=this.tf_per_char[t].clone(),s=this.tf_per_char[t],n=t+1;n<e;n++)this.tf_per_char[n]!=s&&(r.mergeFormat(this.tf_per_char[n]),s=this.tf_per_char[n]);return r},r.prototype.replaceSelectedText=function(t){return this._insertNewText(t)},r.prototype.replaceText=function(t,e,i){var r=this._iTextWoLineBreaks.slice(0,t-1),s=this._iTextWoLineBreaks.slice(e,this._iTextWoLineBreaks.length);this.text=r+i+s,this._selectionEndIndex=this._selectionBeginIndex+i.length},r.prototype.setSelection=function(t,e){this._selectionBeginIndex==t&&this._selectionBeginIndex==e||(this._selectionBeginIndex=t,this._selectionEndIndex=e,this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics())},r.prototype.setTextFormat=function(t,e,i){if(void 0===e&&(e=-1),void 0===i&&(i=-1),t&&0!=this._iTextWoLineBreaks.length){if(-1==e&&-1==i||0==e&&-1==i||(-1==e||0==e)&&i>=this._iTextWoLineBreaks.length){var r=this._textFormats.length;if(1===this._textFormats.length&&this._textFormats[0].equal(t))return;for(var s=0;s<r;s++)this._textFormats[s]=this._textFormats[s].clone(),t.applyToFormat(this._textFormats[s]);return this._textDirty=!0,void(this._textShapesDirty=!0)}var n,o=0,a=[],l=[],h=0,c=-1,u=this._textFormats.length,p=this._iTextWoLineBreaks.length;if(-1==e&&(e=0),-1==i&&(i=p),i<e){var d=i;i=e,e=d}i==e&&i++;for(var _=0;_<u;_++)if(_>0&&(h=c),c=this._textFormatsIdx[_],n=this._textFormats[_],h<=e&&c>e){for(h<e&&(a.push(n),l.push(e));c<i;){var f=this._textFormats[_].clone();t.applyToFormat(f),a.push(f),l.push(c),++_<u?(c=this._textFormatsIdx[_],n=this._textFormats[_]):c=i+1}if(c==i){f=n.clone();t.applyToFormat(f),a.push(f),l.push(i)}if(c>i){f=n.clone();t.applyToFormat(f),a.push(f),l.push(i),a.push(n),l.push(c)}}else a.push(this._textFormats[_]),l.push(this._textFormatsIdx[_]);for(this._textFormats.length=0,this._textFormatsIdx.length=0,o=0;o<a.length;o++)this._textFormats[o]=a[o],this._textFormatsIdx[o]=l[o];this._textDirty=!0,this._textShapesDirty=!0}},r.isFontCompatible=function(t,e){return!1},r.prototype.onKey=function(t){var e=t;this.addChar(e.char,e.isShift,e.isCTRL,e.isAlt)},r.prototype.addCharCode=function(t){this.addChar(String.fromCharCode(t))},r.prototype.deleteSelectedText=function(t){if(void 0===t&&(t="Backspace"),0!=this.text.length){if(this._selectionBeginIndex!=this._selectionEndIndex){var e=0!=this._selectionBeginIndex?this._iText.slice(0,this._selectionBeginIndex):"",i=this._selectionEndIndex<this._iText.length?this._iText.slice(this._selectionEndIndex,this._iText.length):"";return this.text=e+i,void(this._selectionEndIndex=this._selectionBeginIndex)}if("Backspace"==t){if(0==this._selectionBeginIndex)return;e=this._iText.slice(0,this._selectionBeginIndex-1),i=this._iText.slice(this._selectionEndIndex,this._iText.length);this.text=e+i,this._selectionBeginIndex-=1,this._selectionEndIndex=this._selectionBeginIndex}else if("Delete"==t){e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex+1,this._iText.length);this.text=e+i,this._selectionEndIndex=this._selectionBeginIndex}}},r.prototype.addChar=function(t,e,i,s){var n=this;void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=!1);var o=!1,a=this._iText;if(this._selectionBeginIndex||(this._selectionBeginIndex=0),this._selectionEndIndex||(this._selectionEndIndex=0),this._selectionEndIndex<this._selectionBeginIndex){var l=this._selectionEndIndex;this._selectionEndIndex=this._selectionBeginIndex,this._selectionBeginIndex=l}if(s||i)i&&!e&&"v"===t&&navigator.clipboard.readText&&navigator.clipboard.readText().then((function(t){n._insertNewText(t)})).catch((function(t){console.warn("[TextField] Can't paste text:",t.message)}));else{if("Backspace"==t||"Delete"==t)this.deleteSelectedText(t),o=!0;else if("ArrowRight"==t)e||this._selectionEndIndex==this._selectionBeginIndex?this._selectionEndIndex>this._selectionBeginIndex?(this._selectionEndIndex+=1,e||(this._selectionBeginIndex=this._selectionEndIndex)):(this._selectionBeginIndex+=1,e||(this._selectionEndIndex=this._selectionBeginIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionBeginIndex=this._selectionEndIndex:this._selectionEndIndex=this._selectionBeginIndex,o=!0;else if("ArrowLeft"==t)e||this._selectionEndIndex==this._selectionBeginIndex?this._selectionEndIndex>this._selectionBeginIndex?(this._selectionBeginIndex-=1,e||(this._selectionEndIndex=this._selectionBeginIndex)):(this._selectionEndIndex-=1,e||(this._selectionBeginIndex=this._selectionEndIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionEndIndex=this._selectionBeginIndex:this._selectionBeginIndex=this._selectionEndIndex,o=!0;else if("Enter"==t&&this.multiline)this._insertNewText("\n"),o=!0;else if(1==t.length){if(this._restrictRegex){var h=t.replace(this._restrictRegex,"");if(h.length<t.length){var c=t.toUpperCase().replace(this._restrictRegex,""),u=t.toLowerCase().replace(this._restrictRegex,"");t=c,c.length<u.length&&(t=u),h.length>t.length&&(t=h)}if(""==t)return}if(this._newTextFormat.font_table){var p=this._newTextFormat.font_table,d=t.charCodeAt(0).toString(),_=!1;if(!(_=(_=(_=_||p.hasChar(d))||p.hasChar(d.toLowerCase()))||p.hasChar(d.toUpperCase())))return void console.log("Char not found",d)}this._insertNewText(t),o=!0}else t.length>1&&console.log("invalid keyboard input: ",t);o&&(this._glyphsDirty=!0,this.invalidate(),a!==this._iText&&this.dispatchEvent(r._onChangedEvent))}if(t&&t.length>0&&this.adapter!=this){var f=void 0;switch(t){case"Backspace":f=8;break;case"Delete":f=46;break;case"ArrowRight":f=39;break;case"ArrowLeft":f=37;break;case".":f=189;break;default:f=t.charCodeAt(0)}this.adapter.dispatchKeyEvent(f,e,i,s)}},r.prototype._insertNewText=function(t){if(this._selectionBeginIndex!=this._selectionEndIndex){var e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex,this._iText.length);if(this.maxChars>0&&e.length+i.length+t.length>this.maxChars){var r=this.maxChars-e.length+i.length;r>0&&(t=t.slice(0,r))}this.text=e+t+i,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}else if(this.maxChars>0&&this._iText.length>=this.maxChars);else{e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex,this._iText.length);this.text=e+t+i,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}},r.prototype.clone=function(){var t=r.getNewTextField();return this.copyTo(t),t},r.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.autoSize=this.autoSize,e.type=this._type,e.html=this.html,e.width=this._width,e.height=this._height,e.newTextFormat=this._newTextFormat.clone(),e.textColor=this._textColor,e.border=this._border,e.borderColor=this._borderColor,e.background=this._background,e.backgroundColor=this._backgroundColor,e.textOffsetX=this.textOffsetX,e.textOffsetY=this.textOffsetY,e.staticMatrix=this.staticMatrix,e.selectable=this._selectable,e.multiline=this.multiline,e.wordWrap=this.wordWrap,e.maxChars=this.maxChars,e.sourceTextField=this,e.html?e.htmlText=this.htmlText:e.text=this.text,this._labelData&&e.setLabelData(this._labelData)},r.prototype._clearTextShapes=function(){var t;for(var e in this._textShapesDirty=!1,this._lastWordsCount=0,this.targetGraphics&&this.targetGraphics.clear(),this.textShapes)(t=this.textShapes[e]).shape&&t.shape.dispose(),t.shape=null,t.elements=null,t.length=0,delete this.textShapes[e]},r._textFields=[],r.assetType="[asset TextField]",r._onChangedEvent=new gt(gt.CHANGED),r}(m),Gt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e}(e.ErrorBase),zt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.view=this.view,t.entity=this.entity,t},e.prototype._dispatchEvent=function(t){t.container.dispatchEvent(this),R.execute_queue()},e.FOCUS_IN="focusIn3d",e.FOCUS_OUT="focusOut3d",e}(e.EventBase),Wt=function(t){function e(e){var i=t.call(this,e)||this;return i.touchPointID=0,i}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.screenX=this.screenX,t.screenY=this.screenY,t.view=this.view,t.containerNode=this.containerNode,t.rootNode=this.rootNode,t.pickable=this.pickable,t.material=this.material,t.uv=this.uv,t.position=this.position,t.normal=this.normal,t.elementIndex=this.elementIndex,t.touchPointID=this.touchPointID,t.ctrlKey=this.ctrlKey,t.shiftKey=this.shiftKey,t._iParentEvent=this,t._iAllowedToPropagate=this._iAllowedToPropagate,t},e.prototype._dispatchEvent=function(t,i){t.isMouseDisabled()&&this.type!=e.TOUCH_OUT&&this.type!=e.TOUCH_ROLL_OUT||(t.container.dispatchEvent(this,i),R.execute_queue())},e.TOUCH_OVER="touchOver3d",e.TOUCH_OUT="touchOut3d",e.TOUCH_ROLL_OVER="touchRollOver3d",e.TOUCH_ROLL_OUT="touchRollOut3d",e.TOUCH_END="touchUp3d",e.TOUCH_BEGIN="touchDown3d",e.TOUCH_MOVE="touchMove3d",e.TOUCH_TAP="tap3d",e}(B),Yt=function(t){function e(e,i,r){void 0===i&&(i=NaN),void 0===r&&(r=NaN);var s=t.call(this,e)||this;return s._oldHeight=i,s._oldWidth=r,s}return l(e,t),Object.defineProperty(e.prototype,"oldHeight",{get:function(){return this._oldHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldWidth",{get:function(){return this._oldWidth},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._oldHeight,this._oldWidth)},e.RESIZE="resize",e}(e.EventBase),Xt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapMatsForBitmaps={},e.awaySymbols={},e}return l(e,t),e.prototype.createMovieClip=function(t,e){return void 0===t&&(t=null),new U(t||new x(this))},e.prototype.createSprite=function(t,e,i){return void 0===t&&(t=null),t?t.getNewObject():new y},e.prototype.createDisplayObjectContainer=function(t){return new m},e.prototype.createTextField=function(t){return new Ht},e.prototype.createBillboard=function(t,e){return new C(t)},e.prototype.createMaterial=function(t,e,i){return new o.MethodMaterial(t,e)},e.prototype.createFrameScripts=function(t,e,i,r){throw"[DefaultSceneGraphFactory] - createFrameScripts should be overwritten by AVM"},e.prototype.createChildInstanceForTimeline=function(t,e,i){throw"[DefaultSceneGraphFactory] - createChildInstanceForTimeline should be overwritten by AVM"},e}(i.DefaultStageFactory),Kt=new e.Point(0,0),Zt=function(t){function o(e,i,r,s,n,o){void 0===r&&(r=!0),void 0===s&&(s=4294967295),void 0===n&&(n=!0),void 0===o&&(o=null);var a=t.call(this,e,i,r,s,n,o)||this;return a._msaaNeedDrop=!1,a._enforceMSAASupport=!1,a._antialiasQuality=f.ALLOW_FORCE_MSAA,a._clearFromDispose=!1,a}return l(o,t),o.getImage=function(t,e,i,r,s,n,a){void 0===i&&(i=!0),void 0===r&&(r=4294967295),void 0===s&&(s=!0),void 0===n&&(n=null),void 0===a&&(a=!1);var l=new o(t,e,i,r,s,n);return a?l._enforceMSAASupport=!0:(l._msaaNeedDrop=!0,l._antialiasQuality=0),l},o.tryStoreImage=function(t,e){e.filterManager.pushTemp(t)},o.getTemp=function(t,e,i,r){void 0===r&&(r=!1);var s=i.filterManager.popTemp(t,e,r&&f.ALLOW_FORCE_MSAA>1);return s.antialiasQuality=r?f.ALLOW_FORCE_MSAA:0,s},o.prototype._dropMSAA=function(){!this._msaaNeedDrop&&this.canUseMSAAInternaly&&(this._enforceMSAASupport=!1,this._msaaNeedDrop=!0,this.wasUpload&&t.prototype.unload.call(this),console.debug("[SceneImage2D Experemental] Drop MSAA support because a setPixel* operation called after upload.",this.id))},Object.defineProperty(o.prototype,"canUseMSAAInternaly",{get:function(){if(this._enforceMSAASupport)return!0;var t=f.MSAA_MINIMAL_IMAGE_SIZE,e=f.MSAA_MINIMAL_IMAGE_SIZE;return this._stage&&(e=Math.min(this._stage.height,e),t=Math.min(this._stage.width,t)),this.width>=t&&this.height>=e&&!this._msaaNeedDrop},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"antialiasQuality",{get:function(){return this.canUseMSAAInternaly?this._antialiasQuality:0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"assetType",{get:function(){return o.assetType},enumerable:!1,configurable:!0}),o.prototype.createRenderer=function(){var t=new e.PerspectiveProjection;t.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,t.originX=-1,t.originY=1,t.transform=new e.Transform,t.transform.scaleTo(1,-1,1),t.transform.moveTo(0,0,-1e3),o._view=new r.View(t,this._stage),o._root=new m,o._rootNode=o._view.getNode(o._root),o._renderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(o._rootNode),o._view.backgroundAlpha=0,o._view.backgroundColor=0,o._renderer.disableClear=!0,o._renderer.renderableSorter=null},o.prototype.createBillboardRenderer=function(){var t=new e.PerspectiveProjection;t.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,t.originX=-1,t.originY=1,t.transform=new e.Transform,t.transform.moveTo(0,0,-1e3),t.transform.lookAt(new e.Vector3D),o._billboardView=new r.View(t,this._stage),o._billboardRoot=new m,o._billboardRenderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(o._billboardView.getNode(o._billboardRoot)),o._billboardView.backgroundAlpha=0,o._billboardView.backgroundColor=0,o._billboardRenderer.disableClear=!0,o._billboardRenderer.renderableSorter=null,o._billboard=new C(s.MaterialManager.getMaterialForBitmap()),o._billboardRoot.addChild(o._billboard)},o.prototype.dispose=function(){this._clearFromDispose=!0,this.unmarkToUnload(),this.unuseWeakRef(),this._data=null,this._locked=!1,t.prototype.dispose.call(this),this._clearFromDispose=!1},o.prototype.unload=function(){var e=this;if(this._imageDataDirty){var i=this.syncData(!0);if("boolean"!=typeof i)return void i.then((function(){return t.prototype.unload.call(e)}))}t.prototype.unload.call(this)},o.prototype.copyTo=function(t){t.copyPixels(this,t.rect,new e.Point(0,0))},o.prototype.copyPixels=function(t,i,r,s,n,o){if(this._lastUsedFill=null,this.unmarkToUnload(),o=this.transparent!==t.transparent||o,!t._imageDataDirty&&i.equals(this._rect)&&this._rect.equals(t.rect)&&!o&&(!this.wasUpload||!t.wasUpload)){var a=t.getDataInternal(!0);return this._data?this._data.set(a):this._data=a.slice(),this._unpackPMA=t._unpackPMA,this._initalFillColor=null,this._imageDataDirty=!1,void this.invalidateGPU()}t.width,t.height,f.CPU_COPY_PIXELS_COUNT,null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor);var l=t;s&&(l=this._stage.filterManager.popTemp(t.width,t.height),this._stage.filterManager.copyPixels(s,l,new e.Rectangle(n.x,n.y,i.width,i.height),new e.Point(0,0)),this._stage.filterManager.copyPixels(t,l,t.rect,new e.Point(0,0),!0,"alpha_back")),this._stage.filterManager.copyPixels(l,this,i,r,o),s&&this._stage.filterManager.pushTemp(l),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.threshold=function(t,e,i,r,s,n,o,a){this._lastUsedFill=null,this.unmarkToUnload(),null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor),this._stage.threshold(t,this,e,i,r,s,n,o,a),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.applyFilter=function(t,e,i,r){if(!f.USE_UNSAFE_FILTERS||!r||!r.filterName)return!1;var s=this._stage.filterManager.applyFilter(t,this,e,i,r.filterName,r);return this._imageDataDirty=s,s&&this.invalidateOwners(),s},o.prototype.colorTransform=function(t,e){this.unmarkToUnload(),this._lastUsedFill=null,this._stage.colorTransform(this,this,t,e),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.setPixel=function(e,i,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel.call(this,e,i,r)},o.prototype.setPixel32=function(e,i,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel32.call(this,e,i,r)},o.prototype.setPixels=function(e,i){this.wasUpload&&this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixels.call(this,e,i)},o.prototype.getPixels=function(e){return this.syncData(),t.prototype.getPixels.call(this,e)},o.prototype.clear=function(){var e=this;if(this._clearFromDispose)t.prototype.clear.call(this);else{var i=this.syncData(!0);if(this.unmarkToUnload(),this.lastUsedTime=-1,"boolean"==typeof i)return this.wasUpload=!1,void t.prototype.clear.call(this);i.then((function(){e.wasUpload=!1,t.prototype.clear.call(e)}))}},o.prototype.getPixel32=function(e,i){return this.syncData(),t.prototype.getPixel32.call(this,e,i)},o.prototype.getPixel=function(t,e){return 16777215&this.getPixel32(t,e)},o.prototype.draw=function(t,e,i,r,s,n){this.unmarkToUnload(),t instanceof g?this._drawAsDisplay(t,e,i,r,s,n):this._drawAsBitmap(t,e,i,r,s,n),this._lastUsedFill=null,this._imageDataDirty=!0,this.invalidateOwners()},o._mapSupportedBlendMode=function(t){switch(void 0===t&&(t=""),t){case null:case"":case i.BlendMode.NORMAL:case i.BlendMode.LAYER:return i.BlendMode.LAYER;case i.BlendMode.MULTIPLY:case i.BlendMode.ADD:case i.BlendMode.ALPHA:return t}return i.BlendMode.LAYER},o.prototype._drawAsBitmap=function(t,e,r,s,n,a){s=s||i.BlendMode.LAYER,o._billboardRenderer||this.createBillboardRenderer(),null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor);var l=this._stage,h=o._mapSupportedBlendMode(s),c=!(!s||h!==i.BlendMode.LAYER||s==i.BlendMode.LAYER)||this===t,u=c?l.filterManager.popTemp(this.width,this.height,!1):this,p=o._billboardRenderer,d=o._billboardRoot,_=o._billboard;if(_.style.sampler.smooth=a,p.disableClear=!c,p.view.target=u,p.view.projection.scale=1e3/u.height,_.style.image=t,_.material.blendMode=c?i.BlendMode.LAYER:h,_.material.useColorTransform=!!r,c&&(p.view.backgroundColor=0,p.view.backgroundAlpha=0),e){var f=d.transform.matrix3D;f.identity(),f._rawData[0]=e.a,f._rawData[1]=-e.b,f._rawData[4]=e.c,f._rawData[5]=-e.d,f._rawData[12]=e.tx,f._rawData[13]=u.height-e.ty,d.transform.invalidateComponents()}else d.transform.rotateTo(0,0,0),d.transform.scaleTo(1,-1,1),d.transform.moveTo(0,u.height,0);d.transform.colorTransform=r,p.render(),c&&(l.filterManager.copyPixels(u,this,this.rect,Kt,!0,s),l.filterManager.pushTemp(u)),_.material.blendMode=i.BlendMode.NORMAL},o.prototype._drawAsDisplay=function(t,r,s,n,a,l){void 0===n&&(n=""),n=n||i.BlendMode.LAYER,o._renderer||this.createRenderer();var h=o._root,c=o._rootNode,u=o._renderer,p=this.canUseMSAAInternaly,d=!t.isAsset(C)&&2===this._stage.context.glVersion&&f.ALLOW_FORCE_MSAA>1&&!p,_=this,g=n!==i.BlendMode.LAYER||null===this._lastUsedFill&&d,m=g||d;if(d&&!g||null===this._initalFillColor?this._initalFillColor=null:this.fillRect(this._rect,this._initalFillColor),m)if(_=o.getTemp(this.width,this.height,this._stage,d),g||null===this._lastUsedFill)u.disableClear=!1,u.view.backgroundColor=0,u.view.backgroundAlpha=0;else{if(this._transparent){var y=e.ColorUtils.float32ColorToARGB(this._lastUsedFill),b=y[0],v=y[1],x=y[2],w=y[3];b/=255,this._lastUsedFill=e.ColorUtils.ARGBtoFloat32(255*b,v*b|0,x*b|0,w*b|0)}u.disableClear=!1,u.view.backgroundColor=16777215&this._lastUsedFill,u.view.backgroundAlpha=this._transparent?(this._lastUsedFill>>>24&255)/255:1}var E=u.view.projection.transform,A=E.matrix3D;if(A.identity(),r){var D=A._rawData;D[0]=r.a,D[1]=r.b,D[4]=r.c,D[5]=r.d,D[10]=1,D[12]=r.tx,D[13]=r.ty}A.appendScale(1,-1,1),A.appendTranslation(0,this._rect.height,1e3),A.invert(),E.matrix3D=A,u.antiAlias=(p?this.antialiasQuality:_.antialiasQuality)||0,u.view.target=_,u.view.projection.scale=1e3/this._rect.height,u.view.projection.ratio=this._rect.width/this._rect.height,u.view.x=-(_.width-this.width),u.view.y=-(_.height-this.height),u.view.width=this.width,u.view.height=this.height;var T=c.addChildAt(t,0),S=T.transformDisabled;T.transformDisabled=!0,T.maskDisabled=!1,h.transform.colorTransform=s,h.blendMode=o._mapSupportedBlendMode(n),u.render(),u.antiAlias=0,u.disableClear=!0,c.removeChildAt(0),T.transformDisabled=S,m&&(this._stage.filterManager.copyPixels(_,this,this._rect,Kt,g,n),o.tryStoreImage(_,this._stage))},o.prototype.reset=function(){},o.prototype.clone=function(){var t=o.getImage(this.width,this.height,this.transparent,null,!1,this._stage,!1);return this.copyTo(t),t},o.assetType="[image SceneImage2D]",o}(i.BitmapImage2D);i.Stage.registerAbstraction(i._Stage_BitmapImage2D,Zt);var Jt=function(){function t(t){this._pickerLookup=new Array,this._pointerDataArray={},this.allowKeyInput=!0,this._eventBubbling=!0,this._allowFocusOnUnfocusable=!0,this._cursorType="auto",this._nullVector=new e.Vector3D,this._dragOut=new q(q.DRAG_OUT),this._dragOver=new q(q.DRAG_OVER),this._dragMove=new q(q.DRAG_MOVE),this._dragStart=new q(q.DRAG_START),this._dragStop=new q(q.DRAG_STOP),this._focusIn=new zt(zt.FOCUS_IN),this._focusOut=new zt(zt.FOCUS_OUT),this._useSoftkeyboard=!1,this._isAVM1Dragging=!1,this._stage=t,this.onDoubleClick=this.onDoubleClick.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this._showCursor=!0;var i=this._stage.container;i.addEventListener("touchstart",this.onMouseDown),i.addEventListener("mousedown",this.onMouseDown),window.addEventListener("touchmove",this.onMouseMove),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),i.addEventListener("touchend",this.onMouseUp),i.addEventListener("mousewheel",this.onMouseWheel),i.addEventListener("mouseover",this.onMouseOver),i.addEventListener("mouseout",this.onMouseOut),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),i.addEventListener("contextmenu",(function(t){return t.preventDefault()}))}return t.prototype.startDragObject=function(t,e){void 0===e&&(e=!1),this._isAVM1Dragging=e,t&&((this._pointerDataArray[0]||(this._pointerDataArray[0]=new Qt(0,!0))).dragCollision=t)},t.prototype.stopDragObject=function(){this._isAVM1Dragging=!1},Object.defineProperty(t.prototype,"showCursor",{get:function(){return this._showCursor},set:function(t){this._showCursor=t,this.cursorType=this._cursorType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorType",{get:function(){return this._cursorType},set:function(t){this._cursorType=t,this._stage.container.style.cursor=this._showCursor?t:"none"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eventBubbling",{get:function(){return this._eventBubbling},set:function(t){this._eventBubbling=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useSoftkeyboard",{get:function(){return this._useSoftkeyboard},set:function(t){this._useSoftkeyboard=t,t?t&&(window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)):(window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp))},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t=this._stage.container;t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("touchstart",this.onMouseDown),t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("touchmove",this.onMouseMove),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchend",this.onMouseUp),t.removeEventListener("wheel",this.onMouseWheel),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),this._stage=null,this._dragOut=null,this._dragOver=null,this._dragMove=null,this._dragStart=null,this._dragStop=null},t.clearInstance=function(t){this._instancePool[t.id]&&(this._instancePool[t.id].dispose(),delete this._instancePool[t.id])},t.getInstance=function(e){return this._instancePool[e.id]||(this._instancePool[e.id]=new t(e))},t.prototype.setFocus=function(t){this._focusNode!=t&&(this._allowFocusOnUnfocusable||this._focusNode.container.tabEnabled)&&(this._focusNode&&this._focusNode.container&&(this.dispatchEvent(this._focusOut,this._focusNode),this._focusNode.container.setFocus(!1,!0)),this._focusNode=t,this._focusNode&&(this.dispatchEvent(this._focusIn,this._focusNode),this._focusNode.container.setFocus(!0,!0)))},t.prototype.getFocus=function(){return this._focusNode},t.prototype.dispatchEvent=function(t,e){if(this._eventBubbling){for(var i=null==e?void 0:e.container,r=[],s=e;s&&(!t.commonAncestor||s!=t.commonAncestor);s=s.parent)r.push(s);for(var n=0,o=r;n<o.length;n++){s=o[n];if(t._dispatchEvent(s,i),!t._iAllowedToPropagate)break}}else e&&t._dispatchEvent(e,e.container)},t.prototype.setupAndDispatchEvent=function(t,e,i,r){void 0===r&&(r=null);var s=e.sourceEvent;s&&(t instanceof q&&(t.delta=s.deltaY,t.buttons=s.buttons),t.ctrlKey=s.ctrlKey,t.altKey=s.altKey,t.shiftKey=s.shiftKey),t=this.setUpEvent(t,e,i,r),this.dispatchEvent(t,t.rootNode)},t.prototype.fireMouseEvents=function(t){if(void 0===t&&(t=null),t||this._updateDirty)for(var e in this._pointerDataArray)this._fireMouseEventsInternal(this._pointerDataArray[e],t)},t.prototype._fireMouseEventsInternal=function(t,e){var i,r,s,n,o,a;if(void 0===e&&(e=null),e)n=e.getViewCollision(t.screenX,t.screenY);else if(this._updateDirty)for(var l=0;l<this._pickerLookup.length;l++)n&&!this._pickerLookup[l].layeredView||(n=this._pickerLookup[l].getViewCollision(t.screenX,t.screenY,!1,n));var h=t.queuedEvents.length;for(l=0;l<h;++l)if(o=t.queuedEvents[l],a=null==n?void 0:n.rootNode,this.setUpEvent(o,t,n),o.type==t.down.type)this._eventBubbling||this._stage.dispatchEvent(o),t.isMouse||this.setupAndDispatchEvent(t.over,t,n),0==t.id&&(t.dragCollision=n),a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),t.dragCollision&&(this.setFocus(t.dragCollision.rootNode),this.setupAndDispatchEvent(this._dragStart,t,t.dragCollision));else if(o.type==t.up.type){this._eventBubbling||this._stage.dispatchEvent(o);var c=null,u=null;this._isAVM1Dragging&&t.dragCollision?(u=t.dragCollision.rootNode,c=t.dragCollision.containerNode):t.dragCollision&&t.dragCollision.rootNode!=a||t.dragCollision&&t.dragCollision.rootNode==a&&(u=t.dragCollision.rootNode,c=t.dragCollision.containerNode),u?this.dispatchEvent(o,u):a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),c?(this._isAVM1Dragging||this.setupAndDispatchEvent(t.click,t,t.dragCollision),this.setupAndDispatchEvent(this._dragStop,t,t.dragCollision)):t.dragCollision&&this.setupAndDispatchEvent(t.upOutside,t,t.dragCollision),t.dragCollision=null,this._isAVM1Dragging=!1,0!=t.id&&delete this._pointerDataArray[t.id]}else o.type==t.move.type?(this._eventBubbling||this._stage.dispatchEvent(o),a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),t.dragCollision&&this.setupAndDispatchEvent(this._dragMove,t,t.dragCollision)):this.dispatchEvent(o,a);t.queuedEvents.length=0,t.rollOut.commonAncestor=null,t.rollOver.commonAncestor=null;var p=null==n?void 0:n.rootNode,d=null===(i=t.prevCollision)||void 0===i?void 0:i.rootNode;if(p!=d){if(d&&(this.setupAndDispatchEvent(t.out,t,t.prevCollision),(null===(r=t.dragCollision)||void 0===r?void 0:r.rootNode)==d&&this.setupAndDispatchEvent(this._dragOut,t,t.prevCollision)),!d&&p&&(this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision),this.setupAndDispatchEvent(t.rollOver,t,n)),d&&!p&&(this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision),this.setupAndDispatchEvent(t.rollOver,t,n)),d&&p){for(var _=[],f=d;f&&!f.container.isAVMScene;)_.push(f),f=f.parent;var g=null;for(f=p;f&&!f.container.isAVMScene;){-1==_.indexOf(f)?f=f.parent:(g=f,f=null)}g!=d&&this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision,g),g!=p&&this.setupAndDispatchEvent(t.rollOver,t,n,g)}t.collisionIsEnabledButton=!!p&&p.buttonEnabled,p&&(this.setupAndDispatchEvent(t.over,t,n),t.dragCollision&&this.setupAndDispatchEvent(this._dragOver,t,n)),t.prevCollision=n}else{var m=!!p&&p.buttonEnabled;t.collisionIsEnabledButton!=m&&m&&(t.isMouse?this.setupAndDispatchEvent(t.over,t,n):(null===(s=t.dragCollision)||void 0===s?void 0:s.rootNode)==p&&this.setupAndDispatchEvent(this._dragOver,t,n)),t.collisionIsEnabledButton=m}t.dragCollision||(this.cursorType=p?p.container.getMouseCursor():"auto"),this._updateDirty=!1},t.prototype.registerPicker=function(t){this._pickerLookup.push(t)},t.prototype.unregisterPicker=function(t){this._pickerLookup.splice(this._pickerLookup.indexOf(t),1)},t.prototype.addEventsForSceneBinary=function(t,e){var i={clientX:null,clientY:null,touches:[],changedTouches:[],preventDefault:function(){}},r=new Float32Array(t),s=0,n=0;n++;var o=r[n++],a=r[n++],l=r[n++];if(1!=a&&6!=a&&12!=a&&262!=a&&518!=a){for(s=0;s<o;s++){(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h}i.changedTouches[0]=i.touches[l]}else{if(1==o)(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.clientX=h.clientX,i.clientY=h.clientY;else for(s=0;s<o;s++){var h;(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],s!=l?i.touches[0]=h:(i.clientX=h.clientX,i.clientY=h.clientY)}}0==a||5==a||11==a||261==a||517==a?this.onMouseDown(i):1==a||6==a||12==a||262==a||518==a?this.onMouseUp(i):2==a?this.onMouseMove(i):console.log("recieved unknown touch event-type: "+a)},t.prototype.fireEventsForSceneFromString=function(t,e){var i={clientX:null,clientY:null,preventDefault:function(){}},r=t.split(","),s=0,n=0,o=parseInt(r[n++]),a=parseInt(r[n++]),l=parseInt(r[n++]);if(i.touches=[],i.changedTouches=[],1!=a&&6!=a){for(s=0;s<o;s++){(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h,i.changedTouches[s]=h}i.changedTouches[s]=i.touches[l]}else for(s=0;s<o;s++){var h;if(s!=l)(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h,i.changedTouches[s]=h;else i.clientX=r[n++],i.clientY=r[n++],n++}0==a?this.onMouseDown(i):1==a?this.onMouseUp(i):2==a?this.onMouseMove(i):261==a?this.onMouseDown(i):6==a&&this.onMouseUp(i)},t.prototype.setUpEvent=function(t,e,i,r){var s,n;return void 0===r&&(r=null),t._iAllowedToImmediatlyPropagate=!0,t._iAllowedToPropagate=!0,t.screenX=e.screenX,t.screenY=e.screenY,t instanceof Wt&&(t.touchPointID=e.id),i?(t.containerNode=i.containerNode,t.rootNode=i.rootNode,t.pickable=i.pickable,t.uv=i.uv,t.position=null===(s=i.position)||void 0===s?void 0:s.clone(),t.normal=null===(n=i.normal)||void 0===n?void 0:n.clone(),t.elementIndex=i.elementIndex):(t.containerNode=null,t.rootNode=null,t.pickable=null,t.uv=null,t.position=this._nullVector,t.normal=this._nullVector,t.elementIndex=0),t.commonAncestor=r,t},t.prototype.queueDispatch=function(t,e,i){e instanceof q&&(e.delta=i instanceof WheelEvent?-3*i.deltaY/100:0,e.buttons=i instanceof MouseEvent?i.buttons:0),e.ctrlKey=i.ctrlKey,e.altKey=i.altKey,e.shiftKey=i.shiftKey;var r=t.queuedEvents.indexOf(e);-1!=r&&t.queuedEvents.splice(r,1),t.queuedEvents.push(e),t.sourceEvent=i},t.prototype.onKeyDown=function(e){if(!t.inputRecorder||t.inputRecorder.recordEvent(e),this.allowKeyInput){switch(e.keyCode){case 32:case 37:case 39:case 38:case 40:e.preventDefault()}if(this._focusNode||this._stage){var i=new ft(ft.KEYDOWN,e.key,e.code);i.isShift=e.shiftKey,i.isCTRL=e.ctrlKey,i.isAlt=e.altKey,i.keyCode=e.keyCode,this._focusNode&&this._focusNode.container.dispatchEvent(i),this._stage&&this._stage.dispatchEvent(i)}}},t.prototype.onKeyUp=function(e){if(!t.inputRecorder||t.inputRecorder.recordEvent(e),this.allowKeyInput){switch(e.keyCode){case 32:case 37:case 39:case 38:case 40:e.preventDefault()}if(this._focusNode||this._stage){var i=new ft(ft.KEYUP,e.key,e.code);i.isShift=e.shiftKey,i.isCTRL=e.ctrlKey,i.isAlt=e.altKey,i.keyCode=e.keyCode,this._focusNode&&this._focusNode.container.dispatchEvent(i),this._stage&&this._stage.dispatchEvent(i)}}},t.prototype.onMouseMove=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onMouseOut=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onMouseOver=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onDoubleClick=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e),e instanceof MouseEvent&&6&e.buttons&&e.preventDefault()},t.prototype.onMouseDown=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e);var i="mousedown"!==e.type;e instanceof MouseEvent&&6&e.buttons&&(i=!0),i&&(e.preventDefault(),this._stage.container.focus())},t.prototype.onMouseUp=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e);var i="mouseup"!==e.type;e instanceof MouseEvent&&1===e.button&&(i=!0),i&&(e.preventDefault(),this._stage.container.focus())},t.prototype.onMouseWheel=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.updateColliders=function(e){this._stage.interactionHandler(e),this._updateDirty=!0;var i=this._pointerDataArray[0]||(this._pointerDataArray[0]=new Qt(0,!0));i.isMouse=e instanceof MouseEvent;var r=i.isMouse?e.type:t._touchToMouseDict[e.type];if(this.queueDispatch(i,t._pointerDict[r],e),i.screenX=this._stage.screenX,i.screenY=this._stage.screenY,e.changedTouches)for(var s=0;s<e.changedTouches.length;s++){var n=e.changedTouches[s],o=this._pointerDataArray[n.identifier]||(this._pointerDataArray[n.identifier]=new Qt(n.identifier)),a=this._stage.mapWindowToStage(n.clientX,n.clientY);o.screenX=a.x,o.screenY=a.y,this.queueDispatch(o,t._pointerDict[e.type],e)}},t._instancePool={},t._touchToMouseDict={touchstart:"mousedown",touchend:"mouseup",touchmove:"mousemove"},t._pointerDict={mouseup:new q(q.MOUSE_UP),mouseupoutside:new q(q.MOUSE_UP_OUTSIDE),click:new q(q.CLICK),mouseout:new q(q.MOUSE_OUT),mousedown:new q(q.MOUSE_DOWN),mousemove:new q(q.MOUSE_MOVE),mouseover:new q(q.MOUSE_OVER),mousewheel:new q(q.MOUSE_WHEEL),dblclick:new q(q.DOUBLE_CLICK),rollover:new q(q.ROLL_OVER),rollout:new q(q.ROLL_OUT),touchend:new Wt(Wt.TOUCH_END),touchtap:new Wt(Wt.TOUCH_TAP),touchout:new Wt(Wt.TOUCH_OUT),touchstart:new Wt(Wt.TOUCH_BEGIN),touchmove:new Wt(Wt.TOUCH_MOVE),touchover:new Wt(Wt.TOUCH_OVER),touchrollover:new Wt(Wt.TOUCH_ROLL_OVER),touchrollout:new Wt(Wt.TOUCH_ROLL_OUT)},t}(),Qt=function(t,e){void 0===e&&(e=!1),this.id=t,this.isMouse=e,this.collisionIsEnabledButton=!1,this.queuedEvents=new Array,e?(this.up=Jt._pointerDict.mouseup,this.upOutside=Jt._pointerDict.mouseupoutside,this.click=Jt._pointerDict.click,this.out=Jt._pointerDict.mouseout,this.down=Jt._pointerDict.mousedown,this.move=Jt._pointerDict.mousemove,this.over=Jt._pointerDict.mouseover,this.wheel=Jt._pointerDict.mousewheel,this.doubleClick=Jt._pointerDict.dblclick,this.rollOver=Jt._pointerDict.rollover,this.rollOut=Jt._pointerDict.rollout):(this.up=Jt._pointerDict.touchend,this.click=Jt._pointerDict.touchtap,this.out=Jt._pointerDict.touchout,this.down=Jt._pointerDict.touchstart,this.move=Jt._pointerDict.touchmove,this.over=Jt._pointerDict.touchover,this.rollOver=Jt._pointerDict.touchrollover,this.rollOut=Jt._pointerDict.touchrollout)},$t=function(t){function e(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=100),void 0===n&&(n=16),void 0===o&&(o=15),void 0===a&&(a=!0);var l=t.call(this,e,i)||this;return l._numVertices=0,l._radius=r,l._height=s,l._segmentsW=n,l._segmentsH=o%2==0?o+1:o,l._yUp=a,l}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t%2==0?t+1:t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f=0,g=0,m=0;if(e==n.ElementsType.TRIANGLE){var y=t;for(this._numVertices=(this._segmentsH+1)*(this._segmentsW+1),m=(this._segmentsH-1)*this._segmentsW*6,this._numVertices==y.numVertices?(y.invalidateIndices(),y.invalidateVertices(y.positions),y.invalidateVertices(y.normals),y.invalidateVertices(y.tangents)):(y.setIndices(new Uint16Array(m)),y.setPositions(new Float32Array(3*this._numVertices)),y.setNormals(new Float32Array(3*this._numVertices)),y.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=y.indices.get(y.numElements),r=y.positions.get(this._numVertices),s=y.normals.get(this._numVertices),o=y.tangents.get(this._numVertices),a=y.concatenatedBuffer.stride/4,h=0;h<=this._segmentsH;++h){var b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(c=g,l=0;l<=this._segmentsW;++l){var w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=h>this._segmentsH/2?this._height/2:-this._height/2,D=x*Math.sin(w),T=1/Math.sqrt(E*E+D*D+v*v),S=Math.sqrt(D*D+E*E);if(this._yUp?(d=0,_=S>.007?E/S:0,u=-v,p=D):(d=S>.007?E/S:0,_=0,u=D,p=v),l==this._segmentsW?(r[g]=r[c],r[g+1]=r[c+1],r[g+2]=r[c+2],s[g]=.5*(s[c]+E*T),s[g+1]=.5*(s[c+1]+u*T),s[g+2]=.5*(s[c+2]+p*T),o[g]=.5*(o[c]+(S>.007?-D/S:1)),o[g+1]=.5*(o[c+1]+d),o[g+2]=.5*(o[c+2]+_)):(r[g]=E,r[g+1]=this._yUp?u-A:u,r[g+2]=this._yUp?p:p+A,s[g]=E*T,s[g+1]=u*T,s[g+2]=p*T,o[g]=S>.007?-D/S:1,o[g+1]=d,o[g+2]=_),l>0&&h>0){var C=(this._segmentsW+1)*h+l,P=(this._segmentsW+1)*h+l-1,I=(this._segmentsW+1)*(h-1)+l-1,O=(this._segmentsW+1)*(h-1)+l;h==this._segmentsH?(r[g]=r[c],r[g+1]=r[c+1],r[g+2]=r[c+2],i[f++]=C,i[f++]=I,i[f++]=O):1==h?(i[f++]=C,i[f++]=P,i[f++]=I):(i[f++]=C,i[f++]=P,i[f++]=I,i[f++]=C,i[f++]=I,i[f++]=O)}g+=a}}}else n.ElementsType.LINE},e.prototype._pBuildUVs=function(t,e){var i,r,s,o;if(e==n.ElementsType.TRIANGLE){var a=t;a.uvs&&this._numVertices==a.numVertices?a.invalidateVertices(a.uvs):a.setUVs(new Float32Array(2*this._numVertices)),s=a.uvs.get(this._numVertices),o=a.uvs.stride;var l=0;for(r=0;r<=this._segmentsH;++r)for(i=0;i<=this._segmentsW;++i)s[l]=i/this._segmentsW*this._scaleU,s[l+1]=r/this._segmentsH*this._scaleV,l+=o}else n.ElementsType.LINE},e}(p),te=function(t){function e(e,i,r,s,n,o,a,l,h,c,u){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=50),void 0===n&&(n=100),void 0===o&&(o=16),void 0===a&&(a=1),void 0===l&&(l=!0),void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0);var p=t.call(this,e,i)||this;return p._numVertices=0,p._topRadius=r,p._pBottomRadius=s,p._height=n,p._pSegmentsW=o,p._pSegmentsH=a,p._topClosed=l,p._bottomClosed=h,p._surfaceClosed=c,p._yUp=u,p}return l(e,t),Object.defineProperty(e.prototype,"topRadius",{get:function(){return this._topRadius},set:function(t){this._topRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomRadius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._pSegmentsW},set:function(t){this.setSegmentsW(t)},enumerable:!1,configurable:!0}),e.prototype.setSegmentsW=function(t){this._pSegmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._pSegmentsH},set:function(t){this.setSegmentsH(t)},enumerable:!1,configurable:!0}),e.prototype.setSegmentsH=function(t){this._pSegmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},Object.defineProperty(e.prototype,"topClosed",{get:function(){return this._topClosed},set:function(t){this._topClosed=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomClosed",{get:function(){return this._bottomClosed},set:function(t){this._bottomClosed=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v,x,w,E,A=0,D=0,T=0,S=0;this._numVertices=0;var C=2*Math.PI/this._pSegmentsW;if(e==n.ElementsType.TRIANGLE){var P=t;if(this._surfaceClosed&&(this._numVertices+=(this._pSegmentsH+1)*(this._pSegmentsW+1),A+=this._pSegmentsH*this._pSegmentsW*6),this._topClosed&&(this._numVertices+=2*(this._pSegmentsW+1),A+=3*this._pSegmentsW),this._bottomClosed&&(this._numVertices+=2*(this._pSegmentsW+1),A+=3*this._pSegmentsW),this._numVertices==P.numVertices?(P.positions.invalidate(),P.normals.invalidate(),P.tangents.invalidate(),P.indices.invalidate()):(P.setIndices(new Uint16Array(A)),P.setPositions(new Float32Array(3*this._numVertices)),P.setNormals(new Float32Array(3*this._numVertices)),P.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=P.indices.get(P.numElements),r=P.positions.get(this._numVertices),s=P.normals.get(this._numVertices),o=P.tangents.get(this._numVertices),a=P.concatenatedBuffer.stride/4,d=0,_=0,this._topClosed&&this._topRadius>0)for(p=-.5*this._height,this._yUp?(w=1,E=0,v=-p,x=0):(w=0,E=-1,v=0,x=p),r[d]=0,r[d+1]=v,r[d+2]=x,s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,T++,l=0;l<=this._pSegmentsW;++l)g=l*C,c=this._topRadius*Math.cos(g),u=this._topRadius*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l==this._pSegmentsW?(r[d]=r[D+a],r[d+1]=r[D+a+1],r[d+2]=r[D+a+2]):(r[d]=c,r[d+1]=v,r[d+2]=x),s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,l>0&&(i[_++]=T-1,i[_++]=S,i[_++]=T),T++;if(this._bottomClosed&&this._pBottomRadius>0)for(p=.5*this._height,D=T*a,S=T,this._yUp?(w=-1,E=0,v=-p,x=0):(w=0,E=1,v=0,x=p),l>0&&(r[d]=0,r[d+1]=v,r[d+2]=x,s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a),T++,l=0;l<=this._pSegmentsW;++l)g=l*C,c=this._pBottomRadius*Math.cos(g),u=this._pBottomRadius*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l==this._pSegmentsW?(r[d]=r[D+a],r[d+1]=r[D+a+1],r[d+2]=r[D+a+2]):(r[d]=c,r[d+1]=v,r[d+2]=x),s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,l>0&&(i[_++]=T-1,i[_++]=T,i[_++]=S),T++;if(b=0==(y=(m=this._pBottomRadius-this._topRadius)/this._height)?1:this._height/m,this._surfaceClosed){var I=void 0,O=void 0,N=void 0,L=void 0,M=void 0,F=void 0,k=void 0,R=void 0;for(h=0;h<=this._pSegmentsH;++h)for(f=this._topRadius-h/this._pSegmentsH*(this._topRadius-this._pBottomRadius),p=-this._height/2+h/this._pSegmentsH*this._height,D=T*a,l=0;l<=this._pSegmentsW;++l)g=l*C,c=f*Math.cos(g),u=f*Math.sin(g),M=b*Math.cos(g),F=b*Math.sin(g),this._yUp?(w=0,E=-M,v=-p,x=u,k=y,R=F):(w=-M,E=0,v=u,x=p,k=F,R=y),l==this._pSegmentsW?(r[d]=r[D],r[d+1]=r[D+1],r[d+2]=r[D+2],s[d]=M,s[d+1]=y,s[d+2]=F,o[d]=F,o[d+1]=w,o[d+2]=E):(r[d]=c,r[d+1]=v,r[d+2]=x,s[d]=M,s[d+1]=k,s[d+2]=R,o[d]=-F,o[d+1]=w,o[d+2]=E),d+=a,l>0&&h>0&&(I=T,N=(O=T-1)-this._pSegmentsW-1,L=I-this._pSegmentsW-1,i[_++]=I,i[_++]=O,i[_++]=N,i[_++]=I,i[_++]=N,i[_++]=L),T++}}else if(e==n.ElementsType.LINE){var B=t,q=this._pSegmentsH*this._pSegmentsW*2+this._pSegmentsW;r=new Float32Array(6*q);var U=new Float32Array(q);for(d=0,_=0,h=0;h<=this._pSegmentsH;++h)for(f=this._topRadius-h/this._pSegmentsH*(this._topRadius-this._pBottomRadius),p=-this._height/2+h/this._pSegmentsH*this._height,l=0;l<=this._pSegmentsW;++l){if(g=l*C,c=f*Math.cos(g),u=f*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l>0&&(r[d++]=c,r[d++]=v,r[d++]=x,U[_++]=1,h>0)){var V=1==h?3-(6*(this._pSegmentsW-l)+12*l):3-12*this._pSegmentsW;r[d]=r[d+++V],r[d]=r[d+++V],r[d]=r[d+++V],r[d++]=c,r[d++]=v,r[d++]=x,U[_++]=1}l<this._pSegmentsW&&(r[d++]=c,r[d++]=v,r[d++]=x)}B.setPositions(r),B.setThickness(U)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a,l,h;if(e==n.ElementsType.TRIANGLE){var c=t;c.uvs&&this._numVertices==c.numVertices?c.invalidateVertices(c.uvs):c.setUVs(new Float32Array(2*this._numVertices)),l=c.uvs.get(this._numVertices),h=c.uvs.stride;var u=2*Math.PI/this._pSegmentsW,p=0;if(this._topClosed)for(l[p]=.5*this._scaleU,l[p+1]=.5*this._scaleV,p+=h,i=0;i<=this._pSegmentsW;++i)a=i*u,s=.5+.5*-Math.cos(a),o=.5+.5*Math.sin(a),l[p]=s*this._scaleU,l[p+1]=o*this._scaleV,p+=h;if(this._bottomClosed)for(l[p]=.5*this._scaleU,l[p+1]=.5*this._scaleV,p+=h,i=0;i<=this._pSegmentsW;++i)a=i*u,s=.5+.5*Math.cos(a),o=.5+.5*Math.sin(a),l[p]=s*this._scaleU,l[p+1]=o*this._scaleV,p+=h;if(this._surfaceClosed)for(r=0;r<=this._pSegmentsH;++r)for(i=0;i<=this._pSegmentsW;++i)l[p]=i/this._pSegmentsW*this._scaleU,l[p+1]=r/this._pSegmentsH*this._scaleV,p+=h}else n.ElementsType.LINE},e}(p),ee=function(t){function e(e,i,r,s,n,o,a,l){return void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=100),void 0===n&&(n=16),void 0===o&&(o=1),void 0===a&&(a=!0),void 0===l&&(l=!0),t.call(this,e,i,0,r,s,n,o,!1,a,!0,l)||this}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e}(te),ie=function(t){function e(e,i,r,s,n,o,a,l){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=100),void 0===n&&(n=1),void 0===o&&(o=1),void 0===a&&(a=!0),void 0===l&&(l=!1);var h=t.call(this,e,i)||this;return h._segmentsW=n,h._segmentsH=o,h._yUp=a,h._width=r,h._height=s,h._doubleSided=l,h}return l(e,t),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doubleSided",{get:function(){return this._doubleSided},set:function(t){this._doubleSided=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d=this._segmentsW+1;if(e==n.ElementsType.TRIANGLE){var _=t,f=(this._segmentsH+1)*d;this._doubleSided&&(f*=2),o=this._segmentsH*this._segmentsW*6,this._doubleSided&&(o*=2),null!=_.indices&&o==_.indices.length?_.invalidateIndices():(_.setIndices(new Uint16Array(o)),this._pInvalidateUVs()),i=_.indices.get(_.numElements),f==_.numVertices?(_.invalidateVertices(_.positions),_.invalidateVertices(_.normals),_.invalidateVertices(_.tangents)):(_.setPositions(new Float32Array(3*f)),_.setNormals(new Float32Array(3*f)),_.setTangents(new Float32Array(3*f)),this._pInvalidateUVs());var g=_.positions.get(f),m=_.normals.get(f),y=_.tangents.get(f);for(a=_.concatenatedBuffer.stride/4,c=0,h=0,p=0;p<=this._segmentsH;++p)for(u=0;u<=this._segmentsW;++u){if(r=(u/this._segmentsW-.5)*this._width,s=(p/this._segmentsH-.5)*this._height,g[h]=r,this._yUp?(g[h+1]=0,g[h+2]=s):(g[h+1]=s,g[h+2]=0),m[h]=0,this._yUp?(m[h+1]=1,m[h+2]=0):(m[h+1]=0,m[h+2]=-1),y[h]=1,y[h+1]=0,y[h+2]=0,h+=a,this._doubleSided){for(var b=h;b<h+3;++b)g[b]=g[b-3],m[b]=-m[b-3],y[b]=-y[b-3];h+=a}if(u!=this._segmentsW&&p!=this._segmentsH){l=u+p*d;var v=this._doubleSided?2:1;i[c++]=l*v,i[c++]=(l+d)*v,i[c++]=(l+d+1)*v,i[c++]=l*v,i[c++]=(l+d+1)*v,i[c++]=(l+1)*v,this._doubleSided&&(i[c++]=(l+d+1)*v+1,i[c++]=(l+d)*v+1,i[c++]=l*v+1,i[c++]=(l+1)*v+1,i[c++]=(l+d+1)*v+1,i[c++]=l*v+1)}}}else if(e==n.ElementsType.LINE){var x=t,w=this._segmentsH+1+d,E=this._width/2,A=this._height/2,D=(g=new Float32Array(6*w),new Float32Array(w));for(c=0,h=0,p=0;p<=this._segmentsH;++p)g[h++]=-E,g[h++]=0,g[h++]=p*this._height-A,g[h++]=E,g[h++]=0,g[h++]=p*this._height-A,D[c++]=1;for(u=0;u<=this._segmentsW;++u)g[h++]=u*this._width-E,g[h++]=0,g[h++]=-A,g[h++]=u*this._width-E,g[h++]=0,g[h++]=A,D[c++]=1;x.setPositions(g),x.setThickness(D)}},e.prototype._pBuildUVs=function(t,e){var i,r,s;if(e==n.ElementsType.TRIANGLE){s=(this._segmentsH+1)*(this._segmentsW+1),this._doubleSided&&(s*=2);var o=t;o.uvs&&s==o.numVertices?o.invalidateVertices(o.uvs):o.setUVs(new Float32Array(2*s)),i=o.uvs.get(s),r=o.uvs.stride;for(var a=0,l=0;l<=this._segmentsH;++l)for(var h=0;h<=this._segmentsW;++h)i[a]=h/this._segmentsW*this._scaleU,i[a+1]=(1-l/this._segmentsH)*this._scaleV,a+=r,this._doubleSided&&(i[a]=h/this._segmentsW*this._scaleU,i[a+1]=(1-l/this._segmentsH)*this._scaleV,a+=r)}else n.ElementsType.LINE},e}(p),re=function(t){function e(e,i,r,s,n){return void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=16),void 0===n&&(n=!0),t.call(this,e,i,r,0,0,s,1,!0,!1,!1,n)||this}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sides",{get:function(){return this._pSegmentsW},set:function(t){this.setSegmentsW(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subdivisions",{get:function(){return this._pSegmentsH},set:function(t){this.setSegmentsH(t)},enumerable:!1,configurable:!0}),e}(te),se=function(t){function e(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=50),void 0===n&&(n=16),void 0===o&&(o=8),void 0===a&&(a=!0);var l=t.call(this,e,i)||this;return l._numVertices=0,l._radius=r,l._tubeRadius=s,l._segmentsR=n,l._segmentsT=o,l._yUp=a,l}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tubeRadius",{get:function(){return this._tubeRadius},set:function(t){this._tubeRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsR",{get:function(){return this._segmentsR},set:function(t){this._segmentsR=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsT",{get:function(){return this._segmentsT},set:function(t){this._segmentsT=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v=0;if(e==n.ElementsType.TRIANGLE){var x=t;this._numVertices=(this._segmentsT+1)*(this._segmentsR+1),v=this._segmentsT*this._segmentsR*6,this._numVertices==x.numVertices?(x.invalidateIndices(),x.invalidateVertices(x.positions),x.invalidateVertices(x.normals),x.invalidateVertices(x.tangents)):(x.setIndices(new Uint16Array(v)),x.setPositions(new Float32Array(3*this._numVertices)),x.setNormals(new Float32Array(3*this._numVertices)),x.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=x.indices.get(x.numElements),r=x.positions.get(this._numVertices),s=x.normals.get(this._numVertices),o=x.tangents.get(this._numVertices),a=x.concatenatedBuffer.stride/4,y=0,b=0;var w,E=2*Math.PI/this._segmentsR,A=2*Math.PI/this._segmentsT,D=void 0,T=void 0,S=void 0,C=void 0,P=void 0,I=void 0,O=0,N=0,L=void 0,M=void 0,F=void 0,k=void 0;for(h=0;h<=this._segmentsT;++h)for(O=y,l=0;l<=this._segmentsR;++l)g=l*E,m=h*A,d=(w=Math.cos(m))*Math.cos(g),_=w*Math.sin(g),f=Math.sin(m),c=this._radius*Math.cos(g)+this._tubeRadius*d,u=this._radius*Math.sin(g)+this._tubeRadius*_,p=h==this._segmentsT?0:this._tubeRadius*f,this._yUp?(P=-f,I=_,S=0,C=w?d/w:c/this._radius,D=-p,T=u):(P=_,I=f,S=w?d/w:c/this._radius,C=0,D=u,T=p),l==this._segmentsR?(r[y]=c,r[y+1]=r[O+1],r[y+2]=r[O+2]):(r[y]=c,r[y+1]=D,r[y+2]=T),s[y]=d,s[y+1]=P,s[y+2]=I,o[y]=-(w?_/w:u/this._radius),o[y+1]=S,o[y+2]=C,y+=a,l>0&&h>0&&(L=N,F=(M=N-1)-this._segmentsR-1,k=L-this._segmentsR-1,i[b++]=L,i[b++]=M,i[b++]=F,i[b++]=L,i[b++]=F,i[b++]=k),N++}else n.ElementsType.LINE},e.prototype._pBuildUVs=function(t,e){var i,r,s,o;if(e==n.ElementsType.TRIANGLE){var a=t;a.uvs&&this._numVertices==a.numVertices?a.invalidateVertices(a.uvs):a.setUVs(new Float32Array(2*this._numVertices)),s=a.uvs.get(this._numVertices),o=a.uvs.stride;var l=0;for(r=0;r<=this._segmentsT;++r)for(i=0;i<=this._segmentsR;++i)s[l]=i/this._segmentsR*this._scaleU,s[l+1]=r/this._segmentsT*this._scaleV,l+=o}else n.ElementsType.LINE},e}(p),ne=function(){function t(){}return t.ADVANCED="advanced",t.NORMAL="normal",t}(),oe=function(t){function s(i){var s=t.call(this,i)||this,o=new e.PerspectiveProjection;return o.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,o.originX=-1,o.originY=1,o.transform=new e.Transform,o.transform.moveTo(0,0,-1e3),o.transform.lookAt(new e.Vector3D),s._view=new r.View(o,s._stage),s._root=new m,s._renderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(s._view.getNode(s._root)),s._renderer.view.projection=o,s._renderer.renderableSorter=null,s}return l(s,t),s.prototype.generate=function(t,e,r,s){var n,o,a=[];for(var l in t.font_styles)for(var h=t.font_styles[l].generateFNTTextures(s,r,e),c=0;c<h.length;c++){o=e;var u=new y;u.graphics.addShape(h[c]),this._root.removeChildren(0,this._root.numChildren),this._root.addChild(u),this._renderer.view.projection.scale=1e3/e;var p=0,d=1==this._stage.glVersion?2*e:e;for(n=new i.BitmapImage2D(d,d,!0,0,!0),a.push(n),t.font_styles[l].addFNTChannel(n);o>=1&&(this._view.backgroundAlpha=0,this._view.backgroundColor=0,this._view.target=n,this._renderer.render(!0,0,p),1!=this._stage.glVersion);)o*=.5,p++}return a},s}($),ae=function(){function t(){}return t.NONE="none",t.PIXEL="pixel",t.SUBPIXEL="subpixel",t}(),le=function(){function t(){}return t.NORMAL="normal",t.SELECTION="selection",t}(),he=function(){function t(t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!1),this._keepMaterial=t,this._disposeSources=e,this._objectSpace=i}return Object.defineProperty(t.prototype,"disposeSources",{get:function(){return this._disposeSources},set:function(t){this._disposeSources=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepMaterial",{get:function(){return this._keepMaterial},set:function(t){this._keepMaterial=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"objectSpace",{get:function(){return this._objectSpace},set:function(t){this._objectSpace=t},enumerable:!1,configurable:!0}),t.prototype.applyToContainer=function(t,e){this.reset(),this.parseContainer(t,e),this.collect(t,!1),this.merge(t,this._disposeSources)},t.prototype.applyToSprites=function(t,e){if(this.reset(),e.length){for(var i=0;i<e.length;i++)e[i]!=t&&this.collect(e[i],this._disposeSources);this.collect(t,!1),this.merge(t,this._disposeSources)}},t.prototype.apply=function(t,e){this.reset(),this.collect(e,this._disposeSources),this.collect(t,!1),this.merge(t,this._disposeSources)},t.prototype.reset=function(){this._toDispose=new Array,this._shapeVOs=new Array},t.prototype.merge=function(t,e){var r,o=t.graphics,a=this._shapeVOs.length>1;for(r=0;r<this._shapeVOs.length;r++){var l=new n.TriangleElements(new i.AttributesBuffer);l.autoDeriveNormals=!1,l.autoDeriveTangents=!1;var h=this._shapeVOs[r];l.setIndices(h.indices),l.setPositions(h.vertices),l.setNormals(h.normals),l.setTangents(h.tangents),l.setUVs(h.uvs),this._keepMaterial&&a?o.addShape(s.Shape.getShape(l,h.material)):o.addShape(s.Shape.getShape(l))}if(this._keepMaterial&&!a&&this._shapeVOs.length&&(t.material=this._shapeVOs[0].material),e)for(var c=this._toDispose.length;r<c;r++)this._toDispose[r].dispose();this._toDispose=null},t.prototype.collect=function(t,e){var i,r;for(i=0;i<t.graphics.count;i++){var s=void 0,n=void 0,o=void 0,a=void 0,l=void 0,h=void 0,c=t.graphics.getShapeAt(i).elements,u=this.getShapeData(t.graphics.getShapeAt(i).material),p=this._objectSpace?u.vertices:[],d=this._objectSpace?u.normals:[],_=this._objectSpace?u.tangents:[];a=p.length,l=d.length,h=_.length;var f=u.uvs.length;this.copyAttributes(c.positions,p,c.numVertices,a),this.copyAttributes(c.normals,d,c.numVertices,l),this.copyAttributes(c.tangents,_,c.numVertices,h),this.copyAttributes(c.uvs,u.uvs,c.numVertices,f);var g=this._objectSpace?0:u.vertices.length/3;o=u.indices.length,n=c.numElements;var m=c.indices.get(n);for(s=0;s<n;s++)r=3*s,u.indices[o++]=m[r]+g,u.indices[o++]=m[r+1]+g,u.indices[o++]=m[r+2]+g;if(!this._objectSpace)for(t.transform.matrix3D.transformVectors(p,p),t.transform.matrix3D.deltaTransformVectors(d,d),t.transform.matrix3D.deltaTransformVectors(_,_),a=u.vertices.length,l=u.normals.length,h=u.tangents.length,n=p.length,s=0;s<n;s++)u.vertices[a++]=p[s],u.normals[l++]=d[s],u.tangents[h++]=_[s]}e&&this._toDispose.push(t)},t.prototype.copyAttributes=function(t,e,i,r){for(var s=t.get(i),n=t.dimensions,o=t.stride,a=i*o,l=0;l<a;l+=o)for(var h=0;h<n;h++)e[r++]=s[l+h]},t.prototype.getShapeData=function(t){var e;if(this._keepMaterial){var i=void 0,r=this._shapeVOs.length;for(i=0;i<r;i++)if(this._shapeVOs[i].material==t){e=this._shapeVOs[i];break}}else this._shapeVOs.length&&(e=this._shapeVOs[0]);return e||((e=new ce).vertices=new Array,e.normals=new Array,e.tangents=new Array,e.uvs=new Array,e.indices=new Array,e.material=t,this._shapeVOs.push(e)),e},t.prototype.parseContainer=function(t,e){var i,r;for(e instanceof y&&e!=t&&this.collect(e,this._disposeSources),r=0;r<e.numChildren;++r)i=e.getChildAt(r),this.parseContainer(t,i)},t}(),ce=function(){},ue=function(){function t(){}return t.string=function(t){return"function"==typeof t&&(t=new t),t},t.byteArray=function(t){return"function"==typeof t&&(t=new t),e.ByteArray,t},t.isHex=function(t){for(var e=t.length,i=0;i<e;++i)if(-1==this._hexChars.indexOf(t.charAt(i)))return!1;return!0},t.tryColor=function(t){if("number"==typeof t)return Math.floor(t);if("string"==typeof t){if("random"==t)return Math.floor(16777216*Math.random());if(null==this._colorNames&&(this._colorNames=new Object,this._colorNames.steelblue=4620980,this._colorNames.royalblue=267920,this._colorNames.cornflowerblue=6591981,this._colorNames.lightsteelblue=11584734,this._colorNames.mediumslateblue=8087790,this._colorNames.slateblue=6970061,this._colorNames.darkslateblue=4734347,this._colorNames.midnightblue=1644912,this._colorNames.navy=128,this._colorNames.darkblue=139,this._colorNames.mediumblue=205,this._colorNames.blue=255,this._colorNames.dodgerblue=2003199,this._colorNames.deepskyblue=49151,this._colorNames.lightskyblue=8900346,this._colorNames.skyblue=8900331,this._colorNames.lightblue=11393254,this._colorNames.powderblue=11591910,this._colorNames.azure=15794175,this._colorNames.lightcyan=14745599,this._colorNames.paleturquoise=11529966,this._colorNames.mediumturquoise=4772300,this._colorNames.lightseagreen=2142890,this._colorNames.darkcyan=35723,this._colorNames.teal=32896,this._colorNames.cadetblue=6266528,this._colorNames.darkturquoise=52945,this._colorNames.aqua=65535,this._colorNames.cyan=65535,this._colorNames.turquoise=4251856,this._colorNames.aquamarine=8388564,this._colorNames.mediumaquamarine=6737322,this._colorNames.darkseagreen=9419919,this._colorNames.mediumseagreen=3978097,this._colorNames.seagreen=3050327,this._colorNames.darkgreen=25600,this._colorNames.green=32768,this._colorNames.forestgreen=2263842,this._colorNames.limegreen=3329330,this._colorNames.lime=65280,this._colorNames.chartreuse=8388352,this._colorNames.lawngreen=8190976,this._colorNames.greenyellow=11403055,this._colorNames.yellowgreen=10145074,this._colorNames.palegreen=10025880,this._colorNames.lightgreen=9498256,this._colorNames.springgreen=65407,this._colorNames.mediumspringgreen=64154,this._colorNames.darkolivegreen=5597999,this._colorNames.olivedrab=7048739,this._colorNames.olive=8421376,this._colorNames.darkkhaki=12433259,this._colorNames.darkgoldenrod=12092939,this._colorNames.goldenrod=14329120,this._colorNames.gold=16766720,this._colorNames.yellow=16776960,this._colorNames.khaki=15787660,this._colorNames.palegoldenrod=15657130,this._colorNames.blanchedalmond=16772045,this._colorNames.moccasin=16770229,this._colorNames.wheat=16113331,this._colorNames.navajowhite=16768685,this._colorNames.burlywood=14596231,this._colorNames.tan=13808780,this._colorNames.rosybrown=12357519,this._colorNames.sienna=10506797,this._colorNames.saddlebrown=9127187,this._colorNames.chocolate=13789470,this._colorNames.peru=13468991,this._colorNames.sandybrown=16032864,this._colorNames.darkred=9109504,this._colorNames.maroon=8388608,this._colorNames.brown=10824234,this._colorNames.firebrick=11674146,this._colorNames.indianred=13458524,this._colorNames.lightcoral=15761536,this._colorNames.salmon=16416882,this._colorNames.darksalmon=15308410,this._colorNames.lightsalmon=16752762,this._colorNames.coral=16744272,this._colorNames.tomato=16737095,this._colorNames.darkorange=16747520,this._colorNames.orange=16753920,this._colorNames.orangered=16729344,this._colorNames.crimson=14423100,this._colorNames.red=16711680,this._colorNames.deeppink=16716947,this._colorNames.fuchsia=16711935,this._colorNames.magenta=16711935,this._colorNames.hotpink=16738740,this._colorNames.lightpink=16758465,this._colorNames.pink=16761035,this._colorNames.palevioletred=14381203,this._colorNames.mediumvioletred=13047173,this._colorNames.purple=8388736,this._colorNames.darkmagenta=9109643,this._colorNames.mediumpurple=9662683,this._colorNames.blueviolet=9055202,this._colorNames.indigo=4915330,this._colorNames.darkviolet=9699539,this._colorNames.darkorchid=10040012,this._colorNames.mediumorchid=12211667,this._colorNames.orchid=14315734,this._colorNames.violet=15631086,this._colorNames.plum=14524637,this._colorNames.thistle=14204888,this._colorNames.lavender=15132410,this._colorNames.ghostwhite=16316671,this._colorNames.aliceblue=15792383,this._colorNames.mintcream=16121850,this._colorNames.honeydew=15794160,this._colorNames.lightgoldenrodyellow=16448210,this._colorNames.lemonchiffon=16775885,this._colorNames.cornsilk=16775388,this._colorNames.lightyellow=16777184,this._colorNames.ivory=16777200,this._colorNames.floralwhite=16775920,this._colorNames.linen=16445670,this._colorNames.oldlace=16643558,this._colorNames.antiquewhite=16444375,this._colorNames.bisque=16770244,this._colorNames.peachpuff=16767673,this._colorNames.papayawhip=16773077,this._colorNames.beige=16119260,this._colorNames.seashell=16774638,this._colorNames.lavenderblush=16773365,this._colorNames.mistyrose=16770273,this._colorNames.snow=16775930,this._colorNames.white=16777215,this._colorNames.whitesmoke=16119285,this._colorNames.gainsboro=14474460,this._colorNames.lightgrey=13882323,this._colorNames.silver=12632256,this._colorNames.darkgrey=11119017,this._colorNames.grey=8421504,this._colorNames.lightslategrey=7833753,this._colorNames.slategrey=7372944,this._colorNames.dimgrey=6908265,this._colorNames.darkslategrey=3100495,this._colorNames.black=0,this._colorNames.transparent=4278190080),null!=this._colorNames[t])return this._colorNames[t];if(6==t.length&&this.isHex(t))return parseInt("0x"+t)}return null},t.color=function(t){var e=this.tryColor(t);if(null==e)throw new Gt("Can't cast to color: "+t);return e},t.tryClass=function(t){if(this._notClasses[t])return t;var e=this._classes[t];if(null!=e)return e;try{return e=window[t],this._classes[t]=e,e}catch(t){}return this._notClasses[t]=!0,t},t.image2D=function(t){if(null==t)return null;if("string"==typeof t&&(t=this.tryClass(t)),"function"==typeof t)try{t=new t}catch(e){t=new t(0,0)}if(t instanceof i.Image2D)return t;throw t instanceof n.ImageTexture2D&&(t=t.image),new Gt("Can't cast to BitmapImage2D: "+t)},t.bitmapTexture=function(e){if(null==e)return null;if("string"==typeof e&&(e=this.tryClass(e)),"function"==typeof e)try{e=new e}catch(t){e=new e(0,0)}if(e instanceof n.ImageTexture2D)return e;try{var i=t.image2D(e);return new n.ImageTexture2D(i)}catch(t){}throw new Gt("Can't cast to ImageTexture2D: "+e)},t._hexChars="0123456789abcdefABCDEF",t._notClasses=new Object,t._classes=new Object,t}(),pe=function(){function t(t,e,i,s){void 0===t&&(t=null),void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=null);var o=this;this._time=0,this._deltaTime=0,this._onProjectionChangedDelegate=function(t){return o._onProjectionChanged(t)},this._rendererClass=s||n.DefaultRenderer,this._pickGroup=r.PickGroup.getInstance(),this.view=i||new r.View,this.container=t||new m,this.camera=e||new N}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},set:function(t){this._container!=t&&(this._mousePicker&&this._mouseManager.unregisterPicker(this._mousePicker),this._container=t,this._node=this._view.getNode(this._container),this._mousePicker=this._pickGroup.getRaycastPicker(this._node),this._tabPicker=this._pickGroup.getTabPicker(this._node),this._mousePicker.findClosestCollision=!0,this._mouseManager.registerPicker(this._mousePicker),this._camera&&(this._camera.clear(),this._node.invalidate()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},set:function(t){this._view!=t&&(this._view&&(this._renderer&&(this._renderer.clear(),this._renderer=null),this._mousePicker&&this._mouseManager.unregisterPicker(this._mousePicker)),this._view=t,this._mouseManager=Jt.getInstance(this._view.stage),this._mousePicker&&this._mouseManager.registerPicker(this._mousePicker),this._camera&&(this._view.projection=this._camera.projection))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this._renderer||(this._renderer=n.RenderGroup.getInstance(this._rendererClass).getRenderer(this._node)),this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseX",{get:function(){return this._mouseX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseY",{get:function(){return this._mouseY},enumerable:!1,configurable:!0}),t.prototype.getLocalMouseX=function(t){return t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).x},t.prototype.getLocalMouseY=function(t){return t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).y},t.prototype.getLocalTouchPoints=function(t){for(var e,r=new Array,s=this._view.stage.touchPoints.length,n=0;n<s;n++)e=t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.touchPoints[n].x,this._view.stage.touchPoints[n].y,1e3)),r.push(new i.TouchPoint(e.x,e.y,this._view.stage.touchPoints[n].id));return r},Object.defineProperty(t.prototype,"rendererClass",{get:function(){return this._rendererClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rendererType",{set:function(t){this._rendererClass!=t&&(this._renderer&&(this._renderer.clear(),this._renderer=null),this._rendererClass=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"camera",{get:function(){return this._camera},set:function(t){this._camera!=t&&(this._camera&&(this._camera.clear(),this._camera.removeEventListener(O.PROJECTION_CHANGED,this._onProjectionChangedDelegate)),this._camera=t,this._camera.addEventListener(O.PROJECTION_CHANGED,this._onProjectionChangedDelegate),this._view&&(this._view.projection=this._camera.projection),this._node.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this._deltaTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseManager",{get:function(){return this._mouseManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mousePicker",{get:function(){return this._mousePicker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabPicker",{get:function(){return this._tabPicker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFacesCount",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.fireMouseEvents=function(){this.disableMouseEvents||this._mouseManager.fireMouseEvents(this._mousePicker)},t.prototype.render=function(t){void 0===t&&(t=!0),this._updateTime(),t&&!this.disableMouseEvents&&this._mouseManager.fireMouseEvents(this._mousePicker),this.beforeRenderCallback&&this.beforeRenderCallback(),this.renderer.render()},t.prototype._updateTime=function(){var t=e.getTimer();0==this._time&&(this._time=t),this._deltaTime=t-this._time,this._time=t},t.prototype.dispose=function(){this._renderer&&(this._renderer.clear(),this._renderer=null),this._mouseManager.dispose(),this._mouseManager=null},t.prototype._onProjectionChanged=function(t){this._view.projection=this._camera.projection},t}();s.MaterialManager.materialClass=o.MethodMaterial,console.debug("AwayJS - Scene - 0.13.326"),t.AntiAliasType=ne,t.Billboard=C,t.BitmapFontChar=nt,t.BitmapFontTable=ot,t.Camera=N,t.CameraEvent=O,t.Cast=ue,t.CastError=Gt,t.ControllerBase=w,t.DefaultFontManager=ct,t.DefaultSceneGraphFactory=Xt,t.DeviceFontManager=lt,t.DisplayObject=g,t.DisplayObjectContainer=m,t.FNTGenerator=oe,t.FirstPersonController=E,t.FocusEvent=zt,t.FollowController=T,t.Font=at,t.FrameScriptManager=R,t.GridFitType=ae,t.HTMLTextProcessor=Ut,t.HoverController=D,t.KeyboardEvent=ft,t.LineSegment=L,t.LoaderContainer=k,t.LookAtController=A,t.Merge=he,t.MorphSprite=b,t.MouseEvent=q,t.MouseManager=Jt,t.MovieClip=U,t.PrefabBase=u,t.PrimitiveCapsulePrefab=$t,t.PrimitiveConePrefab=ee,t.PrimitiveCubePrefab=d,t.PrimitiveCylinderPrefab=te,t.PrimitivePlanePrefab=ie,t.PrimitivePolygonPrefab=re,t.PrimitivePrefabBase=p,t.PrimitiveSpherePrefab=_,t.PrimitiveTorusPrefab=se,t.ResizeEvent=Yt,t.Scene=pe,t.SceneImage2D=Zt,t.Settings=f,t.SimpleButton=V,t.Skybox=z,t.SkyboxElements=j,t.SpringController=S,t.Sprite=y,t.TesselatedFontChar=Q,t.TesselatedFontTable=st,t.TextField=Ht,t.TextFieldAutoSize=K,t.TextFieldType=Z,t.TextFormat=dt,t.TextFormatAlign=J,t.TextInteractionMode=le,t.TextLineMetrics=_t,t.TextSprite=mt,t.TextfieldEvent=gt,t.Timeline=x,t.TouchEvent=Wt,t._Render_Billboard=P,t._Render_LineSegment=M,t._Render_Skybox=Y,t._Render_SkyboxElements=H,t._Render_SkyboxMaterial=W,t._Stage_SkyboxElements=G,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
3
|
+
var Et=function(t){var e={exports:{}};return t(e,e.exports),e.exports}((function(t,e){!function(i){var r=e,s=t&&t.exports==r&&t,n="object"==typeof wt&&wt;n.global!==n&&n.window!==n||(i=n);var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,h=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},u=/["&'<>`]/g,p={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},d=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,_=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,g={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},m={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},y={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},b=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],v=String.fromCharCode,x={}.hasOwnProperty,w=function(t,e){return x.call(t,e)},E=function(t,e){if(!t)return e;var i,r={};for(i in e)r[i]=w(t,i)?t[i]:e[i];return r},A=function(t,e){var i="";return t>=55296&&t<=57343||t>1114111?(e&&S("character reference outside the permissible Unicode range"),"�"):w(y,t)?(e&&S("disallowed character reference"),y[t]):(e&&function(t,e){for(var i=-1,r=t.length;++i<r;)if(t[i]==e)return!0;return!1}(b,t)&&S("disallowed character reference"),t>65535&&(i+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=v(t))},D=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},T=function(t){return"&#"+t+";"},S=function(t){throw Error("Parse error: "+t)},C=function(t,e){(e=E(e,C.options)).strict&&_.test(t)&&S("forbidden code point");var i=e.encodeEverything,r=e.useNamedReferences,s=e.allowUnsafeSymbols,n=e.decimal?T:D,p=function(t){return n(t.charCodeAt(0))};return i?(t=t.replace(a,(function(t){return r&&w(c,t)?"&"+c[t]+";":p(t)})),r&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(t=t.replace(h,(function(t){return"&"+c[t]+";"})))):r?(s||(t=t.replace(u,(function(t){return"&"+c[t]+";"}))),t=(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(h,(function(t){return"&"+c[t]+";"}))):s||(t=t.replace(u,p)),t.replace(o,(function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1);return n(1024*(e-55296)+i-56320+65536)})).replace(l,p)};C.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var P=function(t,e){var i=(e=E(e,P.options)).strict;return i&&d.test(t)&&S("malformed character reference"),t.replace(f,(function(t,r,s,n,o,a,l,h,c){var u,p,d,_,f,y;return r?g[f=r]:s?(f=s,(y=n)&&e.isAttributeValue?(i&&"="==y&&S("`&` did not start a character reference"),t):(i&&S("named character reference was not terminated by a semicolon"),m[f]+(y||""))):o?(d=o,p=a,i&&!p&&S("character reference was not terminated by a semicolon"),u=parseInt(d,10),A(u,i)):l?(_=l,p=h,i&&!p&&S("character reference was not terminated by a semicolon"),u=parseInt(_,16),A(u,i)):(i&&S("named character reference was not terminated by a semicolon"),t)}))};P.options={isAttributeValue:!1,strict:!1};var I={version:"1.2.0",encode:C,decode:P,escape:function(t){return t.replace(u,(function(t){return p[t]}))},unescape:P};if(r&&!r.nodeType)if(s)s.exports=I;else for(var O in I)w(I,O)&&(r[O]=I[O]);else i.he=I}(wt)}));class At extends bt{constructor(t){super(),this.rawText=t,this.nodeType=vt.TEXT_NODE}get text(){return this.rawText}get isWhitespace(){return/^(\s| )*$/.test(this.rawText)}toString(){return this.text}}let Dt={};function Tt(t,e){return t?e?t.toLowerCase()===e.toLowerCase():!t:!e}const St={f145(t,e,i){if(e=e||"",i=i||[],t.id!==e.substr(1))return!1;for(let e=i,r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f45(t,e,i){for(let e=i=i||[],r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f15:(t,e)=>(e=e||"",t.id===e.substr(1)),f1(t,e){if(e=e||"",t.id!==e.substr(1))return!1},f5:()=>!0,f55(t,e,i,r){r=r||"";return t.attributes.hasOwnProperty(r)},f245(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f25(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f2(t,e,i,r,s){r=(r||"").toLowerCase(),s=s||"";const n=t.attributes;return Object.keys(n).some((t=>{const e=n[t];return t.toLowerCase()===r&&e===s}))},f345(t,e,i){if(e=e||"",i=i||[],!Tt(t.tagName,e))return!1;for(let e=i,r=0;r<e.length;r++)if(-1===t.classNames.indexOf(e[r]))return!1;return!0},f35:(t,e)=>(e=e||"",Tt(t.tagName,e)),f3:(t,e)=>(e=e||"",Tt(t.tagName,e))};class Ct{constructor(t){this.nextMatch=0,this.matchers=t.split(" ").map((t=>{if(Dt[t])return Dt[t];const e=t.split("."),i=e[0],r=e.slice(1).sort();let s="f",n="",o="";if(i&&"*"!==i)if(i.startsWith("#"))s+="1";else{const t=/\[\s*([\w-]+)(\s*=\s*(('\s*(.*)'|"\s*(.*)")|(\S*)))?\s*\]/.exec(i);t?(n=t[1],o=t[5]||t[6]||t[7],s+="2"):s+="3"}r.length>0&&(s+="4"),s+="5";const a={func:St[s],tagName:i||"",classes:r||"",attr_key:n||"",value:o||""};return Dt[t]=a}))}advance(t){return!!(this.nextMatch<this.matchers.length&&this.matchers[this.nextMatch].func(t,this.matchers[this.nextMatch].tagName,this.matchers[this.nextMatch].classes,this.matchers[this.nextMatch].attr_key,this.matchers[this.nextMatch].value))&&(this.nextMatch++,!0)}rewind(){this.nextMatch--}get matched(){return this.nextMatch===this.matchers.length}reset(){this.nextMatch=0}flushCache(){Dt={}}}function Pt(t){return t[t.length-1]}const It=new Map;It.set("DIV",!0),It.set("div",!0),It.set("P",!0),It.set("p",!0),It.set("LI",!0),It.set("li",!0),It.set("TD",!0),It.set("td",!0),It.set("SECTION",!0),It.set("section",!0),It.set("BR",!0),It.set("br",!0);class Ot extends bt{constructor(t,e,i="",r=null){if(super(),this.rawAttrs=i,this.parentNode=r,this.classNames=[],this.nodeType=vt.ELEMENT_NODE,this.rawTagName=t,this.rawAttrs=i||"",this.parentNode=r||null,this.childNodes=[],e.id&&(this.id=e.id,i||(this.rawAttrs=`id="${e.id}"`)),e.class&&(this.classNames=e.class.split(/\s+/),!i)){const t=`class="${this.classNames.join(" ")}"`;this.rawAttrs?this.rawAttrs+=` ${t}`:this.rawAttrs=t}}remove(){if(this.parentNode){const t=this.parentNode.childNodes;this.parentNode.childNodes=t.filter((t=>this!==t))}}removeChild(t){this.childNodes=this.childNodes.filter((e=>e!==t))}exchangeChild(t,e){const i=this.childNodes;this.childNodes=i.map((i=>i===t?e:i))}get tagName(){return this.rawTagName?this.rawTagName.toUpperCase():this.rawTagName}get rawText(){return this.childNodes.reduce(((t,e)=>t+e.rawText),"")}get text(){return Et.decode(this.rawText)}get structuredText(){let t=[];const e=[t];return function i(r){if(r.nodeType===vt.ELEMENT_NODE)It.get(r.rawTagName)?(t.length>0&&e.push(t=[]),r.childNodes.forEach(i),t.length>0&&e.push(t=[])):r.childNodes.forEach(i);else if(r.nodeType===vt.TEXT_NODE)if(r.isWhitespace)t.prependWhitespace=!0;else{let e=r.text;t.prependWhitespace&&(e=` ${e}`,t.prependWhitespace=!1),t.push(e)}}(this),e.map((t=>t.join("").trim().replace(/\s{2,}/g," "))).join("\n").replace(/\s+$/,"")}toString(){const t=this.rawTagName;if(t){const e=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i.test(t),i=this.rawAttrs?` ${this.rawAttrs}`:"";return e?`<${t}${i}>`:`<${t}${i}>${this.innerHTML}</${t}>`}return this.innerHTML}get innerHTML(){return this.childNodes.map((t=>t.toString())).join("")}set_content(t,e={}){if(t instanceof bt)t=[t];else if("string"==typeof t){const i=Bt(t,e);t=i.childNodes.length?i.childNodes:[new At(t)]}this.childNodes=t}get outerHTML(){return this.toString()}trimRight(t){for(let e=0;e<this.childNodes.length;e++){const i=this.childNodes[e];if(i.nodeType===vt.ELEMENT_NODE)i.trimRight(t);else{const r=i.rawText.search(t);r>-1&&(i.rawText=i.rawText.substr(0,r),this.childNodes.length=e+1)}}return this}get structure(){const t=[];let e=0;function i(i){t.push(" ".repeat(e)+i)}return function t(r){const s=r.id?`#${r.id}`:"",n=r.classNames.length?`.${r.classNames.join(".")}`:"";i(r.rawTagName+s+n),e++,r.childNodes.forEach((e=>{e.nodeType===vt.ELEMENT_NODE?t(e):e.nodeType===vt.TEXT_NODE&&(e.isWhitespace||i("#text"))})),e--}(this),t.join("\n")}removeWhitespace(){let t=0;return this.childNodes.forEach((e=>{if(e.nodeType===vt.TEXT_NODE){if(e.isWhitespace)return;e.rawText=e.rawText.trim()}else e.nodeType===vt.ELEMENT_NODE&&e.removeWhitespace();this.childNodes[t++]=e})),this.childNodes.length=t,this}querySelectorAll(t){let e;if(t instanceof Ct)e=t,e.reset();else{if(t.includes(",")){const e=t.split(",");return Array.from(e.reduce(((t,e)=>this.querySelectorAll(e.trim()).reduce(((t,e)=>t.add(e)),t)),new Set))}e=new Ct(t)}const i=[];return this.childNodes.reduce(((r,s)=>{for(i.push([s,0,!1]);i.length;){const s=Pt(i),n=s[0];if(0===s[1]){if(n.nodeType!==vt.ELEMENT_NODE){i.pop();continue}const o=n;if(s[2]=e.advance(o),s[2]&&e.matched){r.push(o),r.push(...o.querySelectorAll(t)),e.rewind(),i.pop();continue}}s[1]<n.childNodes.length?i.push([n.childNodes[s[1]++],0,!1]):(s[2]&&e.rewind(),i.pop())}return r}),[])}querySelector(t){let e;t instanceof Ct?(e=t,e.reset()):e=new Ct(t);const i=[];for(const t of this.childNodes)for(i.push([t,0,!1]);i.length;){const t=Pt(i),r=t[0];if(0===t[1]){if(r.nodeType!==vt.ELEMENT_NODE){i.pop();continue}if(t[2]=e.advance(r),t[2]&&e.matched)return r}t[1]<r.childNodes.length?i.push([r.childNodes[t[1]++],0,!1]):(t[2]&&e.rewind(),i.pop())}return null}appendChild(t){return this.childNodes.push(t),t instanceof Ot&&(t.parentNode=this),t}get firstChild(){return this.childNodes[0]}get lastChild(){return Pt(this.childNodes)}get attributes(){if(this._attrs)return this._attrs;this._attrs={};const t=this.rawAttributes;for(const e in t){const i=t[e]||"";this._attrs[e]=Et.decode(i)}return this._attrs}get rawAttributes(){if(this._rawAttrs)return this._rawAttrs;const t={};if(this.rawAttrs){const e=/\b([a-z][a-z0-9-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/gi;let i;for(;i=e.exec(this.rawAttrs);)t[i[1]]=i[2]||i[3]||i[4]||null}return this._rawAttrs=t,t}removeAttribute(t){const e=this.rawAttributes;delete e[t],this._attrs&&delete this._attrs[t],this.rawAttrs=Object.keys(e).map((t=>{const i=JSON.stringify(e[t]);return void 0===i||"null"===i?t:`${t}=${i}`})).join(" ")}hasAttribute(t){return t in this.attributes}getAttribute(t){return this.attributes[t]}setAttribute(t,e){if(arguments.length<2)throw new Error("Failed to execute 'setAttribute' on 'Element'");const i=this.rawAttributes;i[t]=String(e),this._attrs&&(this._attrs[t]=Et.decode(i[t])),this.rawAttrs=Object.keys(i).map((t=>{const e=JSON.stringify(i[t]);return"null"===e||'""'===e?t:`${t}=${e}`})).join(" ")}setAttributes(t){this._attrs&&delete this._attrs,this._rawAttrs&&delete this._rawAttrs,this.rawAttrs=Object.keys(t).map((e=>{const i=t[e];return"null"===i||'""'===i?e:`${e}=${JSON.stringify(String(i))}`})).join(" ")}insertAdjacentHTML(t,e){if(arguments.length<2)throw new Error("2 arguments required");const i=Bt(e);if("afterend"===t){const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t+1,0,...i.childNodes),i.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=this.parentNode)}))}else if("afterbegin"===t)this.childNodes.unshift(...i.childNodes);else if("beforeend"===t)i.childNodes.forEach((t=>{this.appendChild(t)}));else{if("beforebegin"!==t)throw new Error(`The value provided ('${t}') is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'`);{const t=this.parentNode.childNodes.findIndex((t=>t===this));this.parentNode.childNodes.splice(t,0,...i.childNodes),i.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=this.parentNode)}))}}}get nextSibling(){if(this.parentNode){const t=this.parentNode.childNodes;let e=0;for(;e<t.length;){if(this===t[e++])return t[e]||null}return null}}get nextElementSibling(){if(this.parentNode){const t=this.parentNode.childNodes;let e=0,i=!1;for(;e<t.length;){const r=t[e++];if(i){if(r instanceof Ot)return r||null}else this===r&&(i=!0)}return null}}}const Nt=/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)\s*([^>]*?)(\/?)>/gi,Lt=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/gi,Mt={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},Ft={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},kt={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},Rt="documentfragmentcontainer";function Bt(t,e={lowerCaseTagName:!1,comment:!1}){const i=e.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},r=Object.keys(i),s=r.map((t=>new RegExp(t,"i"))),n=r.filter((t=>i[t])).map((t=>new RegExp(t,"i")));function o(t){return n.some((e=>e.test(t)))}function a(t){return s.some((e=>e.test(t)))}const l=new Ot(null,{});let h=l;const c=[l];let u,p=-1;for(t=`<${Rt}>${t}</${Rt}>`;u=Nt.exec(t);){if(p>-1&&p+u[0].length<Nt.lastIndex){const e=t.substring(p,Nt.lastIndex-u[0].length);h.appendChild(new At(e))}if(p=Nt.lastIndex,u[2]!==Rt)if("!"!==u[0][1]){if(e.lowerCaseTagName&&(u[2]=u[2].toLowerCase()),!u[1]){const i={};for(let t;t=Lt.exec(u[3]);)i[t[2].toLowerCase()]=t[4]||t[5]||t[6];const r=h.rawTagName;if(!u[4]&&Ft[r]&&Ft[r][u[2]]&&(c.pop(),h=Pt(c)),h=h.appendChild(new Ot(u[2],i,u[3])),c.push(h),a(u[2])){const i=`</${u[2]}>`,r=e.lowerCaseTagName?t.toLocaleLowerCase().indexOf(i,Nt.lastIndex):t.indexOf(i,Nt.lastIndex);if(o(u[2])){let e;e=-1===r?t.substr(Nt.lastIndex):t.substring(Nt.lastIndex,r),e.length>0&&h.appendChild(new At(e))}-1===r?p=Nt.lastIndex=t.length+1:(p=Nt.lastIndex=r+i.length,u[1]="true")}}if(u[1]||u[4]||Mt[u[2]])for(;;){if(h.rawTagName===u[2]){c.pop(),h=Pt(c);break}{const t=h.tagName;if(kt[t]&&kt[t][u[2]]){c.pop(),h=Pt(c);continue}break}}}else if(e.comment){const e=t.substring(p-3,p-u[0].length+4);h.appendChild(new xt(e))}}const d=Boolean(1===c.length);if(!e.noFix){const t=l;for(t.valid=d;c.length>1;){const t=c.pop(),e=Pt(c);t.parentNode&&t.parentNode.parentNode&&(t.parentNode===e&&t.tagName===e.tagName?(e.removeChild(t),t.childNodes.forEach((t=>{e.parentNode.appendChild(t)})),c.pop()):(e.removeChild(t),t.childNodes.forEach((t=>{e.appendChild(t)}))))}return t.childNodes.forEach((t=>{t instanceof Ot&&(t.parentNode=null)})),t}const _=new At(t);return _.valid=d,_}var qt=[{test:/\>/g,replace:">"}],Ut=function(){function t(){}return t.get=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.processHTML=function(t,e){e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/"/g,'"')).replace(/&/g,"&")).replace(/'/g,"'")).replace(new RegExp(" ","g")," ")).replace(new RegExp("â","g"),String.fromCharCode(8730))).replace(new RegExp("Ã","g"),String.fromCharCode(215))).replace(new RegExp("<\\\\","g"),"</")).replace(new RegExp("<br>","g"),"<br/>")).replace(new RegExp("<BR>","g"),"<br/>")).replace(new RegExp("<BR/>","g"),"<br/>")).replace(new RegExp("<B","g"),"<b")).replace(new RegExp("</B>","g"),"</b>")).replace(new RegExp("<I","g"),"<i")).replace(new RegExp("</I>","g"),"</i>")).replace(new RegExp("<P","g"),"<p")).replace(new RegExp("</P>","g"),"</p>")).replace(new RegExp("<U","g"),"<u")).replace(new RegExp("</U>","g"),"</u>")).replace(new RegExp("<LI","g"),"<li")).replace(new RegExp("</LI>","g"),"</li>")).replace(new RegExp("<FONT","g"),"<font")).replace(new RegExp("</FONT>","g"),"</font>")).replace(new RegExp("& ","g"),"& ");for(var i=0,r=[],s=[],n=[];i<e.length;)if("<"==e[i]){if("p"==e[i+1])r[r.length]="p";else if("b"==e[i+1]&&"r"!=e[i+2])r[r.length]="b";else if("i"==e[i+1])r[r.length]="i";else if("u"==e[i+1])r[r.length]="u";else if("f"==e[i+1]&&"o"==e[i+2]&&"n"==e[i+3]&&"t"==e[i+4])r[r.length]="font",i+=2;else if("l"==e[i+1]&&"i"==e[i+2])r[r.length]="li",i++;else if("/"==e[i+1]&&"p"==e[i+2]){for(var o=r.length,a=-1;o>0;)if("p"==r[--o]){a=o;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(o=r.length-1;o>a;)s[s.length]=i,n[n.length]="</"+r[o]+">",r.pop(),o--;r.pop()}}else if("/"==e[i+1]&&"b"==e[i+2]){var l=r.length;for(a=-1;l>0;)if("b"==r[--l]){a=l;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(l=r.length-1;l>a;)s[s.length]=i,n[n.length]="</"+r[l]+">",r.pop(),l--;r.pop()}}else if("/"==e[i+1]&&"i"==e[i+2]){var h=r.length;for(a=-1;h>0;)if("i"==r[--h]){a=h;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(h=r.length-1;h>a;)s[s.length]=i,n[n.length]="</"+r[h]+">",r.pop(),h--;r.pop()}}else if("/"==e[i+1]&&"u"==e[i+2]){var c=r.length;for(a=-1;c>0;)if("u"==r[--c]){a=c;break}if(a<0)s[s.length]=i,n[n.length]=4;else{for(c=r.length-1;c>a;)s[s.length]=i,n[n.length]="</"+r[c]+">",r.pop(),c--;r.pop()}}else if("/"==e[i+1]&&"l"==e[i+2]&&"i"==e[i+3]){var u=r.length;for(a=-1;u>0;)if("li"==r[--u]){a=u;break}if(a<0)s[s.length]=i,n[n.length]=7;else{for(u=r.length-1;u>a;)s[s.length]=i,n[n.length]="</"+r[u]+">",r.pop(),u--;r.pop()}}else if("/"==e[i+1]&&"f"==e[i+2]&&"o"==e[i+3]&&"n"==e[i+4]&&"t"==e[i+5]){var p=r.length;for(a=-1;p>0;)if("font"==r[--p]){a=p;break}if(a<0)s[s.length]=i,n[n.length]=7;else{for(p=r.length-1;p>a;)s[s.length]=i,n[n.length]="</"+r[p]+">",r.pop(),p--;r.pop()}}i++}else i++;for(var d=r.length;d>0;)d--,s[s.length]=i,n[n.length]="</"+r[d]+">";for(var _=0,f=n.length,g=0;g<f;g++)"number"==typeof n[g]?(e=e.slice(0,s[g]+_)+e.slice(s[g]+_+n[g]),_-=n[g]):(e=e.slice(0,s[g]+_)+n[g]+e.slice(s[g]+_),_+=n[g].length);var m={text:""},y=t.newTextFormat;t._textFormats=[y],t._textFormatsIdx=[0];var b=Bt(e);return b&&b.firstChild&&(m.multiline=b.firstChild.childNodes.length>0,this.readHTMLTextPropertiesRecursive(t,b,m,y)),""==m.text||13!=m.text.charCodeAt(m.text.length-1)&&10!=m.text.charCodeAt(m.text.length-1)||(m.text=m.text.slice(0,m.text.length-1)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),""!=m.text&&m.text.length>=2&&"n"==m.text[m.text.length-1]&&"\\"==m.text[m.text.length-2]&&(m.text=m.text.slice(0,m.text.length-2)),t._textFormatsIdx[t._textFormatsIdx.length-1]=m.text.length,m.text},t.prototype.readHTMLTextPropertiesRecursive=function(t,e,i,r){var s=[],n=[];if(e.attributes){if(e.attributes.size||e.attributes.SIZE)o=(o=e.attributes.size?e.attributes.size:e.attributes.SIZE).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="size";if(e.attributes.color||e.attributes.COLOR)o=(o=e.attributes.color?e.attributes.color:e.attributes.COLOR).replace("#","0x"),s[s.length]=parseInt(o),n[n.length]="color";if(e.attributes.indent||e.attributes.INDENT)o=(o=e.attributes.indent?e.attributes.indent:e.attributes.INDENT).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="indent";if(e.attributes.leftMargin||e.attributes.LEFTMARGIN)o=(o=e.attributes.leftMargin?e.attributes.leftMargin:e.attributes.LEFTMARGIN).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="leftMargin";if(e.attributes.rightMargin||e.attributes.RIGHTMARGIN)o=(o=e.attributes.rightMargin?e.attributes.rightMargin:e.attributes.RIGHTMARGIN).replace(/[^0-9.]/g,""),s[s.length]=parseInt(o),n[n.length]="rightMargin";if(e.attributes.align||e.attributes.ALIGN){var o=e.attributes.align?e.attributes.align:e.attributes.ALIGN;s[s.length]=o,n[n.length]="align"}if(e.attributes.face||e.attributes.FACE){o=e.attributes.face?e.attributes.face:e.attributes.FACE;s[s.length]=o,n[n.length]="font_name"}}"b"==e.tagName||"b"==e.rawTagName?r.bold||(s[s.length]=!0,n[n.length]="bold"):"i"==e.tagName||"i"==e.rawTagName?r.italic||(s[s.length]=!0,n[n.length]="italic"):"u"==e.tagName||"u"==e.rawTagName?r.underline||(s[s.length]=!0,n[n.length]="underline"):"font"==e.tagName||"font"==e.rawTagName||("li"==e.tagName||"li"==e.rawTagName?i.text+="\n ● ":("br"!=e.tagName&&"br"!=e.rawTagName||!t.multiline)&&("sbr"!=e.tagName&&"sbr"!=e.rawTagName||!t.multiline)||(i.text+="\n"));for(var a=!1,l=s.length;l>0;)if(r[n[--l]]!=s[l]){a=!0;break}var h=r;if(a){for(h=r.clone(),l=s.length;l>0;)h[n[--l]]=s[l];t._textFormats.push(h),t._textFormatsIdx[t._textFormatsIdx.length-1]=i.text.length,t._textFormatsIdx.push(i.text.length)}if(e.childNodes&&e.childNodes.length>0)for(var c=0;c<e.childNodes.length;c++)t._textFormats[t._textFormats.length-1]!=h&&(t._textFormats.push(h),t._textFormatsIdx[t._textFormatsIdx.length-1]=i.text.length,t._textFormatsIdx.push(i.text.length)),this.readHTMLTextPropertiesRecursive(t,e.childNodes[c],i,h);else if(""!=e.text.replace(/[\s\r\n]/gi,"")){for(var u=e.text,p=0,d=qt;p<d.length;p++){var _=d[p];u=u.replace(_.test,_.replace)}i.text+=u}"ul"==e.tagName||"ul"==e.rawTagName||"li"==e.tagName||"li"==e.rawTagName||"p"!=e.tagName&&"p"!=e.rawTagName||(i.text+="\n")},t}(),Vt=function(){function t(t){void 0===t&&(t=40),this.index=-1,this.store=Array.from({length:t},(function(t){return{x:1/0,y:1/0,start:0,width:0,len:0}}))}return t.prototype.put=function(t,e,i,r,s){this.index++;var n=this.store[this.index]||(this.store[this.index]={});return n.start=t,n.x=e,n.y=i,n.width=r,n.len=s,n},Object.defineProperty(t.prototype,"last",{get:function(){return this.store[this.index]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.index+1},set:function(t){this.index=t-1},enumerable:!1,configurable:!0}),t.prototype.get=function(t){return this.store[t]},t.prototype.free=function(){this.index=-1},t.prototype.dispose=function(){this.store=null,this.index=0},t}(),jt=[{test:/'/g,replace:"'"},{test:/>/g,replace:">"}],Ht=function(t){function r(){var i=t.call(this)||this;return i.textOffsetX=0,i.textOffsetY=0,i._selectionBeginIndex=0,i._selectionEndIndex=0,i._biggestLine=0,i._iText="",i._iTextDiffStart=0,i._text="",i._iTextWoLineBreaks="",i._newTextFormat=new dt,i.cursorIntervalID=-1,i.chars_codes=[],i.chars_width=[],i.tf_per_char=[],i.words=new Vt(10),i._textRuns_formats=[],i._textRuns_words=[],i._paragraph_textRuns_indices=[],i._maxWidthLine=0,i._labelData=null,i.lines_wordStartIndices=[],i.lines_wordEndIndices=[],i.lines_start_y=[],i.lines_start_x=[],i.lines_charIdx_start=[],i.lines_charIdx_end=[],i.lines_width=[],i.lines_height=[],i.lines_numSpacesPerline=[],i.char_positions_x=[],i.char_positions_y=[],i.sourceTextField=null,i._maskWidth=0,i._maskHeight=0,i._maskTextOffsetX=0,i._maskTextOffsetY=0,i.isStatic=!1,i._internalScale=new e.Vector3D(1,1,1),i.onKeyDelegate=function(t){return i.onKey(t)},i.startSelectionByMouseDelegate=function(t){return i.startSelectionByMouse(t)},i.stopSelectionByMouseDelegate=function(t){return i.stopSelectionByMouse(t)},i.updateSelectionByMouseDelegate=function(t){return i.updateSelectionByMouse(t)},i._onClipboardPasteDelegate=function(t){return i.onClipboardPaste(t)},i.cursorIntervalID=-1,i._tabEnabled=!0,i.cursorType="",i.textOffsetX=0,i.textOffsetY=0,i.textShapes={},i._textColor=0,i._width=100,i._height=100,i._textWidth=0,i._textHeight=0,i._type=Z.DYNAMIC,i._selectable=!1,i._numLines=0,i.multiline=!1,i._autoSize=K.NONE,i._wordWrap=!1,i._background=!1,i._backgroundColor=16777215,i._border=!1,i._borderColor=0,i.html=!1,i.maxChars=0,i._selectionBeginIndex=0,i._selectionEndIndex=0,i._scrollH=0,i._scrollV=0,i._textFormats=[],i._graphics=s.Graphics.getGraphics(),i._graphics.addOwner(i),i.mouseEnabled=i._selectable,i}return l(r,t),r.getNewTextField=function(){return r._textFields.length?r._textFields.pop():new r},r.clearPool=function(){r._textFields=[]},r.prototype.updateMaskMode=function(){this.inMaskMode&&(this._maskWidth==this._width&&this._maskHeight==this._height&&this._maskTextOffsetX==this.textOffsetX&&this._maskTextOffsetY==this.textOffsetY||(this._maskWidth=this._width,this._maskHeight=this._height,this._maskTextOffsetX=this.textOffsetX,this._maskTextOffsetY=this.textOffsetY,this.maskChild.graphics.clear(),this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill()),this._graphics.clear()),this.inMaskMode||(this.inMaskMode=!0,this.maskChild||(this.maskChild=new y),this.textChild||(this.textChild=new mt),this.textChild.mouseEnabled=!1,this.textChild.parentTextField=this,this.maskChild.mouseEnabled=!1,this.maskChild.graphics.beginFill(16777215),this.maskChild.graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,this._height),this.maskChild.graphics.endFill(),this.addChild(this.maskChild),this.addChild(this.textChild),this.maskChild.visible=!1,this._graphics.clear(),this.targetGraphics=this.textChild.graphics),this._textWidth>this._width||this._textHeight>this._height?this.textChild.mask=this.maskChild:this.textChild.mask=void 0},r.prototype.getMouseCursor=function(){return this.cursorType},Object.defineProperty(r.prototype,"isInFocus",{get:function(){return this._isInFocus},set:function(t){},enumerable:!1,configurable:!0}),r.prototype.setFocus=function(e,i,r){void 0===i&&(i=!1),void 0===r&&(r=!0),this._isInFocus!=e&&(t.prototype.setFocus.call(this,e,i,r),this.enableInput(e),this._selectable&&(this.setSelection(0,0),this._glyphsDirty=!0,this.invalidate()))},r.prototype.enableInput=function(t){if(void 0===t&&(t=!0),this.cursorIntervalID>=0&&(window.clearInterval(this.cursorIntervalID),this.cursorIntervalID=-1),t&&this._isInFocus&&this.selectable){this.drawSelectionGraphics();var e=this;this.cursorIntervalID=window.setInterval((function(){e.cursorBlinking=!e.cursorBlinking,e.selectable||(e.cursorBlinking=!0),e._shapesDirty=!0,e.invalidate()}),500)}},r.prototype.findCharIdxForMouse=function(t){var i=new e.Point(t.position.x,t.position.y),r=this.getLineIndexAtPoint(i.x,i.y),s=this.getCharIndexAtPoint(i.x,i.y,r);return r>=this.lines_start_x.length&&(r=this.lines_start_x.length-1),r<0&&(r=0),r>=0&&s<0&&void 0!==this.lines_start_x[r]&&(s=i.x<=this.lines_start_x[r]?this.lines_charIdx_start[r]:this.lines_charIdx_end[r]),(r<0||s<0)&&(s=0),s},r.prototype.startSelectionByMouse=function(t){this._selectionBeginIndex=this.findCharIdxForMouse(t),this._selectionEndIndex=this._selectionBeginIndex,this.cursorShape&&this.cursorShape.invalidate(),this.cursorShape=void 0,this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this._shapesDirty=!0,this._textShapesDirty=!0,this.cursorBlinking=!1,this.drawSelectionGraphics()},r.prototype.stopSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},r.prototype.updateSelectionByMouse=function(t){this._selectionEndIndex=this.findCharIdxForMouse(t),this.bgShapeSelect&&this.bgShapeSelect.invalidate(),this.bgShapeSelect=void 0,this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics()},r.prototype.drawSelectionGraphics=function(){this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length),this._selectionEndIndex<0&&(this._selectionEndIndex=0),this._selectionEndIndex>this.char_positions_x.length&&(this._selectionEndIndex=this.char_positions_x.length),this._selectionBeginIndex===this._selectionEndIndex?(this.showSelection=!1,this.drawCursor()):(this.showSelection=!0,this.cursorBlinking=!0,this.drawSelectedBG())},r.prototype.scrollToCursor=function(t,e){},r.prototype.drawCursor=function(){if(this._shapesDirty=!0,!this.cursorBlinking&&this.selectable&&this.selectionBeginIndex===this.selectionEndIndex){var t=0,i=0,r=this._newTextFormat;0==this.char_positions_x.length?(t=this.textOffsetX+this._width/2+this._textWidth/2,"justify"==r.align||"center"==r.align||("right"==r.align?t=this.textOffsetX+this._width-2:"left"==r.align&&(t=this.textOffsetX+4+this._textWidth))):this._selectionBeginIndex==this.char_positions_x.length?(t=this.char_positions_x[this._selectionBeginIndex-1]+this.chars_width[this._selectionBeginIndex-1],i=this.char_positions_y[this._selectionBeginIndex-1],r=this.tf_per_char[this._selectionBeginIndex-1]):(t=this.char_positions_x[this._selectionBeginIndex],i=this.char_positions_y[this._selectionBeginIndex],r=this.tf_per_char[this._selectionBeginIndex]),r.font_table.initFontSize(r.size);var o=r.font_table.getLineHeight(),a=this.getTextColorForTextFormat(r),l=this.internalScale.x;l<=0&&(l=1);var h=[t-.5*l,i,l,o];if(this.cursorShape?s.GraphicsFactoryHelper.updateRectanglesShape(this.cursorShape,h):(this.cursorShape=s.GraphicsFactoryHelper.drawRectangles(h,a,1),this.cursorShape.usages++),this.cursorShape.style.color!==a){var c=new s.SolidFillStyle(a,e.ColorUtils.float32ColorToARGB(a)[0]/255||1),u=s.MaterialManager.getMaterialForColor(c),p=this.cursorShape;p.material=u,u.getNumTextures()&&(p.style=new n.Style,p.style.image=s.TextureAtlas.getTextureForColor(c),p.style.uvMatrix=c.getUVMatrix())}this.scrollToCursor(t,i)}},r.prototype.drawSelectedBG=function(){this._shapesDirty=!0,this._textShapesDirty=!0,this._selectionBeginIndex<0&&(this._selectionBeginIndex=0),this._selectionBeginIndex>this.char_positions_x.length&&(this._selectionBeginIndex=this.char_positions_x.length);var t=this._selectionBeginIndex,e=this._selectionEndIndex;this._selectionEndIndex<this._selectionBeginIndex&&(t=this._selectionEndIndex,e=this._selectionBeginIndex);var i=0,r=0,n=-1,o=null,a=-1,l=0,h=0,c=[];if(0!=this.char_positions_x.length&&this._selectionEndIndex!=this._selectionBeginIndex)for(var u=e>this.char_positions_x.length?this.char_positions_x.length:e,p=t;p<u;p++)p==this.char_positions_x.length?(i=this.char_positions_x[p-1]+this.chars_width[p-1],r=this.char_positions_y[p-1],o=this.tf_per_char[p-1]):(i=this.char_positions_x[p],r=this.char_positions_y[p],o=this.tf_per_char[p]),a<0&&(a=i),n>=0&&n!=r&&(c.push(a,n,l,h),l=0,a=i),l+=this.chars_width[p],n=r,o.font_table.initFontSize(o.size),h=Math.max(h,o.font_table.getLineHeight());if(l>0)return c.push(a,n,l,h),void(this.bgShapeSelect?s.GraphicsFactoryHelper.updateRectanglesShape(this.bgShapeSelect,c):(this.bgShapeSelect=s.GraphicsFactoryHelper.drawRectangles(c,0,1),this.bgShapeSelect.usages++));this.scrollToCursor(a+l,n+h)},r.prototype.drawBG=function(){this._background&&(this._graphics.beginFill(this.backgroundColor,1),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this.width,this.height),this._graphics.endFill());var t=this.pickObject;t||(this.pickObject=t||(t=new y),t.pickObjectFromTimeline=!0);var e=t.graphics;e.clear(),e.beginFill(0,1),e.drawRect(this.textOffsetX,this.textOffsetY,this.width,this.height),e.endFill()},r.prototype.drawBorder=function(){var t=this.border?.25*this.internalScale.x:0,e=this.border?.25*this.internalScale.y:0;this._graphics.beginFill(this._borderColor,1),this._graphics.drawRect(this.textOffsetX,this.textOffsetY,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+this._height-2*e,this._width,2*e),this._graphics.drawRect(this.textOffsetX,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.drawRect(this.textOffsetX+this._width-2*t,this.textOffsetY+2*e,2*t,this._height-2*e),this._graphics.endFill()},r.prototype.getTextShapeForIdentifierAndFormat=function(t,e){return this.textShapes[t]?this.textShapes[t]:this.textShapes[t]=new yt(e,t)},Object.defineProperty(r.prototype,"autoSize",{get:function(){return this._autoSize},set:function(t){if(this._autoSize!=t){if("string"==typeof t){if(t!=K.CENTER&&t!=K.NONE&&t!=K.LEFT&&t!=K.RIGHT)return}else"boolean"==typeof t&&(t=t?K.LEFT:K.NONE),"number"==typeof t&&(t=t>0?K.LEFT:K.NONE);this._autoSize=t,this._positionsDirty=!0,this._autoSize!=K.NONE&&this.invalidate()}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"internalScale",{get:function(){return this._internalScale},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"assetType",{get:function(){return r.assetType},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"background",{get:function(){return this._background},set:function(t){this._background!=t&&(this._background=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._shapesDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"border",{get:function(){return this._border},set:function(t){t!=this._border&&(this._border=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"borderColor",{get:function(){return this._borderColor},set:function(t){t!=this.borderColor&&(this._borderColor=t,this._shapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottomScrollV",{get:function(){return this._bottomScrollV},set:function(t){t!=this._bottomScrollV&&(this._bottomScrollV=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"caretIndex",{get:function(){return this._caretIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._autoSize!=K.NONE&&this.reConstruct(),this._height},set:function(t){this._height!=t&&this._autoSize==K.NONE&&(this._height=t,this._positionsDirty=!0,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"htmlText",{get:function(){return this._htmlText},set:function(t){if((t=null==t?"":t.toString())!=this._htmlText){this._htmlText=t;var e=Ut.get().processHTML(this,t);this._labelData=null,this._text=e,this._iText=e,this._iTextWoLineBreaks=e.replace(/(\r\n|\n|\\n|\r)/gm,""),this._textDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"length",{get:function(){return this._iText.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxScrollH",{get:function(){return this.reConstruct(),this._maxScrollH},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxScrollV",{get:function(){return this.reConstruct(),this._maxScrollV},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"numLines",{get:function(){return this.reConstruct(),this._numLines},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"restrict",{get:function(){return this._restrict},set:function(t){t!=this._restrict&&(this._restrict=t,this._restrictRegex=null,void 0!==t&&((t=t.toString()).length>=2&&"-"==t[0]&&!isNaN(parseInt(t[1]))&&(t="0"+t),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"")).replace(/\^/g,"")).replace(/([^a-zA-Z0-9])\-/g,"$1\\-")).replace(/\./g,"\\.")).replace(/\</g,"\\<")).replace(/\>/g,"\\>")).replace(/\+/g,"\\+")).replace(/\*/g,"\\*")).replace(/\?/g,"\\?")).replace(/\[/g,"\\[")).replace(/\]/g,"\\]")).replace(/\$/g,"\\$")).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")).replace(/\{/g,"\\{")).replace(/\}/g,"\\}")).replace(/\=/g,"\\=")).replace(/\!/g,"\\!")).replace(/\:/g,"\\:")).replace(/\|/g,"\\|")).replace(/\//g,"\\/")).replace(/\%/g,"\\%"),this._restrictRegex=new RegExp("[^"+t+"]","g")))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scrollH",{get:function(){return this._scrollH},set:function(t){t!=this._scrollH&&(this._scrollH=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scrollV",{get:function(){return this._scrollV},set:function(t){var e=Math.round(t);e!==this._scrollV&&(this._scrollV=e,this._scrollV>this._maxScrollV&&(this._scrollV=this._maxScrollV),this._scrollV<=0&&(this._scrollV=0),this.textChild&&(this.textChild.y=-this.lines_start_y[this._scrollV]))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectable",{get:function(){return this._selectable},set:function(t){this.selectable!=t&&(this._selectable=t,this.mouseEnabled=t,this.cursorType=t?"text":"",t?(this.addEventListener(q.DRAG_START,this.startSelectionByMouseDelegate),this.addEventListener(q.DRAG_STOP,this.stopSelectionByMouseDelegate),this.addEventListener(q.DRAG_MOVE,this.updateSelectionByMouseDelegate)):(this.removeEventListener(q.DRAG_START,this.startSelectionByMouseDelegate),this.removeEventListener(q.DRAG_STOP,this.stopSelectionByMouseDelegate),this.removeEventListener(q.DRAG_MOVE,this.updateSelectionByMouseDelegate)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectionBeginIndex",{get:function(){return this._selectionBeginIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectionEndIndex",{get:function(){return this._selectionEndIndex},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"text",{get:function(){return this._text},set:function(t){if(t=(t=null==t?"":t.toString()).replace(String.fromCharCode(160)," "),this._text!=t||this._newFormatDirty){this._newFormatDirty=!1,this._labelData=null,this._text=t,""==t||13!=t.charCodeAt(t.length-1)&&10!=t.charCodeAt(t.length-1)||(t=t.slice(0,t.length-1)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&"\\"==t[t.length-3]&&(t=t.slice(0,t.length-3)),""!=t&&t.length>=3&&"n"==t[t.length-1]&&"\\"==t[t.length-2]&&(t=t.slice(0,t.length-2));for(var e=0,i=jt;e<i.length;e++){var r=i[e];t=t.replace(r.test,r.replace)}this._iText=t,this._iTextWoLineBreaks=t.replace(/(\r\n|\n|\\n|\r)/gm,""),this._textFormats=[this.newTextFormat],this._textFormatsIdx=[this._iText.length],this._textDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),r.prototype.setLabelData=function(t){this._labelData=t,this.isStatic=!0,this._iText="",this._iTextWoLineBreaks="",this._textDirty=!1,this._positionsDirty=!1,this._glyphsDirty=!0,this.invalidate()},Object.defineProperty(r.prototype,"newTextFormat",{get:function(){return this._newTextFormat.clone()},set:function(t){if(!t)throw new Error("TextField::: set newTextFormat - no value!");t.equal(this._newTextFormat)||(this._newTextFormat=t.clone(),this._newFormatDirty=!0,this._textShapesDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleX",{get:function(){return this._transform.scale.x},set:function(t){this._transform.scale.x!=t&&this._setScaleX(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleY",{get:function(){return this._transform.scale.y},set:function(t){this._transform.scale.y!=t&&this._setScaleY(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textColor",{get:function(){return this._textColor},set:function(t){if(this._textColor!=t){if(this._textColor=t,this._textFormats){for(var e=this._textFormats.length;e>0;)e--,this._textFormats[e]&&(this._textFormats[e].color=t);this._textDirty=!0}this._glyphsDirty=!0,this._textShapesDirty=!0,this.invalidate()}},enumerable:!1,configurable:!0}),r.prototype.getTextColorForTextFormat=function(t){return t.hasPropertySet("color")?t.color:this._textColor},Object.defineProperty(r.prototype,"textInteractionMode",{get:function(){return this._textInteractionMode},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textWidth",{get:function(){return this.reConstruct(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textHeight",{get:function(){return this.reConstruct(),this.type==Z.INPUT&&""==this._iText?(this._newTextFormat.font_table.initFontSize(this._newTextFormat.size),this._newTextFormat.font_table.getLineHeight()):this._textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this._type},set:function(t){this._type!=t&&(this._type=t,this._textDirty=!0,t==Z.INPUT?(this.enableInput(!0),this.addEventListener(ft.KEYDOWN,this.onKeyDelegate)):(this.enableInput(!1),this.removeEventListener(ft.KEYDOWN,this.onKeyDelegate)),this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"x",{get:function(){return this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x},set:function(t){this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._transform.position.x!=t&&(this._transform.matrix3D._rawData[12]=t,this._transform.invalidatePosition())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this._autoSize==K.NONE||this._wordWrap||this.reConstruct(),this._width},set:function(t){this._width!=t&&(this._width=t,this._positionsDirty=!0,this.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!=t&&(this._wordWrap=t,this._positionsDirty=!0,t||this.invalidate())},enumerable:!1,configurable:!0}),r.prototype.advanceFrame=function(){},r.prototype.getEntity=function(){return this.reConstruct(!0),this._graphics},r.prototype.clear=function(){t.prototype.clear.call(this)},r.prototype.dispose=function(){this.disposeValues(),r._textFields.push(this)},r.prototype.disposeValues=function(){t.prototype.disposeValues.call(this),this.maskChild&&(this.maskChild.dispose(),this.maskChild=null),this.textChild&&(this.textChild.dispose(),this.textChild=null),this.cursorShape&&(this.cursorShape.dispose(),this.cursorShape=null),this.bgShapeSelect&&(this.bgShapeSelect.dispose(),this.bgShapeSelect=null),this._labelData&&(this._labelData=null),this._resetParagraph(),this._clearTextShapes()},r.prototype.reConstruct=function(t){void 0===t&&(t=!1),(this._textDirty||this._positionsDirty||this._glyphsDirty||this._shapesDirty)&&(this._textDirty&&(this._positionsDirty=!0,this._lastWordsCount=this.words.length,this.char_positions_x.length=0,this.char_positions_y.length=0,this.words.length=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this._maxScrollH=0,this._maxScrollV=0,this._maxWidthLine=0,this.buildParagraphs()),this._positionsDirty&&(this._glyphsDirty=!0,""!=this._iText&&null!=this._textFormats[0]?this.getWordPositions(this._textFormats[0]):(this._textWidth=0,this._textHeight=0,this._autoSize!=K.NONE&&(this.wordWrap||this.adjustPositionForAutoSize(0),this._height=4,this._type==Z.INPUT&&(this._newTextFormat.font_table.initFontSize(this._newTextFormat.size),this._height=this._newTextFormat.font_table.getLineHeight()+4)),this._type==Z.INPUT&&this.drawSelectionGraphics()),this.updateMaskMode()),this._textDirty=!1,this._positionsDirty=!1,t&&(this._glyphsDirty&&(this._labelData?this.buildGlyphsForLabelData():this.buildGlyphs()),this._glyphsDirty=!1,this._labelData||(this.buildShapes(),this._shapesDirty=!1)))},r.prototype.reset=function(){t.prototype.reset.call(this),this.sourceTextField&&this.sourceTextField.copyTo(this)},r.prototype.onClipboardPaste=function(t){var e=(t.clipboardData||self.clipboardData).getData("text");e&&(t.preventDefault(),this._selectionBeginIndex>0||this._selectionEndIndex>this.length?this._insertNewText(e):this.text=e)},r.prototype._resetParagraph=function(){this._textShapesDirty=this._textShapesDirty||this.chars_codes.length>0,this.tf_per_char.length=0,this.chars_width.length=0,this.chars_codes.length=0,this._paragraph_textRuns_indices.length=0,this._textRuns_formats.length=0,this._textRuns_words.length=0},r.prototype.buildParagraphs=function(){if(this._textDirty)if(""!==this._iText&&this._textFormats[0]){var t=0,e=0,i=0,r=0,s=0,n=0,o=0,a=this._iText,l=this._textFormatsIdx.length,h=this._paragraph_textRuns_indices,c=this._textRuns_formats,u=this._textRuns_words,p=this.chars_codes,d=this.tf_per_char,_=this.chars_width,f=function(e){h[t]=e,t++},g=function(t,i){return void 0===i&&(i=!1),i&&f(e),c[e++]=t,t},m=function(t){return u[i++]=t,t},y=function(t,e,i){s+=+(t!==p[r]),s+=+(e!==d[r]),s+=+(i!==_[r]),p[r]=t,d[r]=e,_[r]=i,r++};f(e);for(var b=0;b<l;b++){var v=0,x=0,w=!0,E=this._textFormats[b],A=this._width-(E.indent+E.leftMargin+E.rightMargin);E.font_table.initFontSize(E.size);var D=b===l-1?a.length:this._textFormatsIdx[b];if(D>o){g(E);for(var T=m({start:this.words.length,count:0,width:0,space:0}),S=o;S<D;S++){var C=a.charCodeAt(S),P=a.charCodeAt(S+1);if(13===C&&(C=10),92!==C||114!==P)if(92===C&&110===P&&(S+=1,C=10,P=a.charCodeAt(S+1)),10===C)T.count=v,T.width=n,T.space=x,g(E,!0),T=m({start:this.words.length,count:0,width:0,space:0}),w=!0,x=0,v=0,this._maxWidthLine<n&&(this._maxWidthLine=n),n=0;else{var I=E.font_table.getCharWidth(C.toString()),O=9==C||32==C;!O&&S<D-1&&9!=P&&32!=P&&(I+=E.letterSpacing),n+=I,y(C,E,I),O?(x++,this.words.put(r-1,0,0,I,1),v++,w=!0):(v>0&&this._autoSize==K.NONE&&this._wordWrap&&this.words.last.width+I>=A&&(w=!0),w?(this.words.put(r-1,0,0,I,1),v++):(this.words.last.width+=I,this.words.last.len+=1),w=!1)}else S+=1}T.count=v,T.width=n,T.space=x,this._maxWidthLine<n&&(this._maxWidthLine=n)}o=D}this._textShapesDirty=this._textShapesDirty||s>0||p.length!==r,h.length=t,u.length=i,c.length=e,p.length=r,d.length=r,_.length=r}else this._resetParagraph()},r.prototype.adjustPositionForAutoSize=function(t){var e=this._width;this._width=4+t,this._autoSize==K.RIGHT?(this._transform.matrix3D._rawData[12]-=this._width-e,this._transform.invalidatePosition()):this._autoSize==K.CENTER&&(this._transform.matrix3D._rawData[12]-=(this._width-e)/2,this._transform.invalidatePosition())},r.prototype.getWordPositions=function(t){var e,i=0,r=this._textRuns_formats.length,s=0,n=0,o=0,a=0,l=0;this._numLines=0;var h=0,c=0,u=0,p=this.textOffsetY+2;if(this._autoSize!=K.NONE&&!this._wordWrap&&this._textDirty){var d=this._maxWidthLine+t.indent+t.leftMargin+t.rightMargin;this.adjustPositionForAutoSize(d)}var _=this._width-(t.indent+t.leftMargin+t.rightMargin),f=0,g=this._paragraph_textRuns_indices.length;h=0,this.lines_wordStartIndices.length=0,this.lines_wordEndIndices.length=0,this.lines_start_y.length=0,this.lines_start_x.length=0,this.lines_width.length=0,this.lines_height.length=0,this.lines_numSpacesPerline.length=0,this.lines_charIdx_start.length=0,this.lines_charIdx_end.length=0;var m=[],y=[];for(f=0;f<g;f++){for(r=f==g-1?this._textRuns_formats.length:this._paragraph_textRuns_indices[f+1],o=0,m[m.length]=0,i=this._paragraph_textRuns_indices[f];i<r;i++)(e=this._textRuns_formats[i]).font_table.initFontSize(e.size),m[m.length-1]<e.font_table.getLineHeight()+e.leading&&(m[m.length-1]=e.font_table.getLineHeight()+e.leading),n=this._textRuns_words[i].start+this._textRuns_words[i].count,o+=this._textRuns_words[i].width;this.lines_wordStartIndices[this.lines_wordStartIndices.length]=this._textRuns_words[this._paragraph_textRuns_indices[f]].start,this.lines_wordEndIndices[this.lines_wordEndIndices.length]=n,this.lines_width[this.lines_width.length]=0,this.lines_numSpacesPerline[this.lines_numSpacesPerline.length]=0;var b=0;for(this.lines_height[this.lines_height.length]=m[b],y[h]=e,i=this._paragraph_textRuns_indices[f];i<r;i++)if((e=this._textRuns_formats[i]).font_table.initFontSize(e.size),l=e.indent,n=this._textRuns_words[i].start+this._textRuns_words[i].count,o<=_||!this.wordWrap)for(s=this._textRuns_words[i].start;s<n;s+=1){c+=u=(L=this.words.get(s)).width,this.lines_wordEndIndices[h]=s+1,this.lines_width[h]+=u,y[h]=e,32!=this.chars_codes[L.start]&&9!=this.chars_codes[L.start]||(this.lines_numSpacesPerline[h]+=1)}else for(u=0,l=0,s=this._textRuns_words[i].start;s<n;s+=1){u=(L=this.words.get(s)).width;var v=!1;32!=this.chars_codes[L.start]&&9!=this.chars_codes[L.start]||(this.lines_numSpacesPerline[h]+=1,v=!0),v||this.lines_width[h]+u<=_-l-1*e.font_table.getCharWidth("32")||0==this.lines_width[h]?(this.lines_wordEndIndices[h]=s+1,this.lines_width[h]+=u,y[h]=e):(h++,this.lines_wordStartIndices[h]=s,this.lines_wordEndIndices[h]=s+1,this.lines_width[h]=u,this.lines_numSpacesPerline[h]=0,this.lines_height[this.lines_height.length]=m[b],y[h]=e,l=e.indent)}b++,h++}var x,w,E,A,D,T=this.textOffsetX,S=0,C=this.lines_wordStartIndices.length,P=0;for(this._biggestLine=0,this._numLines=C,D=0;D<C;D++){c=this.lines_width[D],w=this.lines_height[D],x=this.lines_wordStartIndices[D],E=this.lines_wordEndIndices[D],this.lines_numSpacesPerline[D],e=y[D],A=_-c,T=this.textOffsetX+e.leftMargin+e.indent,e.align==J.JUSTIFY?0!=D&&(T-=e.indent):e.align==J.CENTER?T+=A>0?A/2:2:e.align==J.RIGHT?T+=A>0?A-2:2:e.align==J.LEFT&&(T+=2);var I=0,O=T;this.lines_start_x[D]=T,this.lines_start_y[D]=p,this.lines_charIdx_start[D]=P;var N=0;for(s=x;s<E;s+=1){var L;(L=this.words.get(s)).x=T,O=0,I=(x=L.start)+L.len;var M=this.tf_per_char[x];M.font_table.initFontSize(M.size);var F=w-(M.font_table.getLineHeight()+M.leading);for(F=F>0?F-2:0,L.y=p+F,S=x;S<I;S++)this.char_positions_x[this.char_positions_x.length]=T+O,this.char_positions_y[this.char_positions_y.length]=p+F,O+=this.chars_width[S],P++;T+=O,N+=O}this.lines_charIdx_end[D]=P,p+=w,N>a&&(this._biggestLine=D,a=N)}if(this._textWidth=a,this._textHeight=p,this.autoSize!=K.NONE&&(this._height=this._textHeight+4),this._textWidth>this._width){x=this.lines_charIdx_start[this._biggestLine],S=this.lines_charIdx_end[this._biggestLine];for(var k=0;S>x;)if(S--,(k+=this.chars_width[S])>this._width){this._maxScrollH=S;break}}if(this._textHeight>this._height){var R=this.lines_height.length;for(k=4;R>0;)if(R--,(k+=this.lines_height[R])>this._height){this._maxScrollV=R+1;break}}},r.prototype.buildGlyphsForLabelData=function(){this._clearTextShapes();for(var t,r,o=[],a=[],l=[],h=[],c=this.staticMatrix.tx/20,u=this.staticMatrix.ty/20,p=0,d=0;d<this._labelData.records.length;d++){o[d]=new dt,a[d]=[],l[d]=[],(t=this._labelData.records[d]).font_table?o[d].font_table=t.font_table:d>0?o[d].font_table=o[d-1].font_table:console.log("error - no font for label"),t.fontHeight?o[d].size=t.fontHeight/20:d>0&&(o[d].size=o[d-1].size),t.color?o[d].color=e.ColorUtils.f32_RGBA_To_f32_ARGB(t.color):d>0&&(o[d].color=o[d-1].color),null!=t.moveY&&(p=u+=t.moveY/20-p),null!=t.moveX&&(c=this.staticMatrix.tx/20+t.moveX/20),h.push(c),h.push(u);for(var _=0;_<t.entries.length;_++)a[d][_]=t.entries[_].glyphIndex,l[d][_]=t.entries[_].advance/20,c+=l[d][_]}var f,g=0,m=o.length,y=0,b=0;for(g=0;g<m;g++)o[g].font_table.initFontSize(o[g].size),b+=(f=o[g].font_table.buildTextLineFromIndices(this,o[g],h[2*g],h[2*g+1],a[g],l[g])).y,y=f.x>y?f.x:y;for(var v in this._textWidth=y,this._textHeight=b,this.targetGraphics=this._graphics,this.targetGraphics.clear(),this.drawBG(),(this.border||!this._background&&this._type!=Z.INPUT)&&this.drawBorder(),this.textShapes){r=this.textShapes[v];for(var x=new i.Float2Attributes(r.length/2),w=new Float32Array(x.attributesBuffer.buffer),E=0,A=0,D=r.verts;A<D.length;A++){var T=D[A];w.set(T,E),E+=T.length}r.elements=new n.TriangleElements,r.elements.setPositions(x),r.elements.invalidate();var S=r.shape=this.targetGraphics.addShape(s.Shape.getShape(r.elements));if(S.deepHitCheck=!0,S.usages++,S.style=new n.Style,r.format.bitmap&&0==this._textColor)S.material=s.MaterialManager.getMaterialForBitmap(!0),S.style.image=this._textFormats[0].bitmap,S.style.uvMatrix=new e.Matrix(0,0,0,0,r.format.uv_values[0],r.format.uv_values[1]);else{var C=this.getTextColorForTextFormat(r.format),P=new s.SolidFillStyle(C,e.ColorUtils.float32ColorToARGB(C)[0]/255||1),I=s.MaterialManager.getMaterialForColor(P);S.material=I,I.getNumTextures()&&(S.style.image=s.TextureAtlas.getTextureForColor(P),S.style.uvMatrix=P.getUVMatrix())}}},r.prototype.buildGlyphs=function(){var t,r=this._textRuns_formats,o=this._textRuns_words,a=r.length;this._textShapesDirty&&this._clearTextShapes();for(var l=0;l<a;l++){var h=o[l];0!=h.count&&(r[l].font_table.initFontSize(r[l].size),f.USE_UNSAFE_FNT&&r[l].font_table.generateFNTData(null),r[l].font_table.fillTextRun(this,r[l],h.start,h.count))}for(var c in this.textShapes)if(0!==(t=this.textShapes[c]).length){for(var u=new i.Float2Attributes(t.length/2),p=new Float32Array(u.attributesBuffer.buffer),d=t.hasUV?new i.Float2Attributes(t.length/2):null,_=d?new Float32Array(d.attributesBuffer.buffer):null,g=0,m=0;m<t.verts.length;m++){var y=t.verts[m];p.set(y,g),_&&_.set(t.uvs[m],g),g+=y.length}if(t.length=0,t.addChunk(p,_),t.shape){var b=t.shape.elements;b.setPositions(p),_&&b.setUVs(_),b.invalidate(),u.dispose(),d&&d.dispose()}else{t.elements=new n.TriangleElements,t.elements.setPositions(u),d&&t.elements.setUVs(d),t.elements.invalidate();var v=t.shape=s.Shape.getShape(t.elements);if(v.deepHitCheck=!0,v.usages++,v.style=new n.Style,v.style.sampler=new i.ImageSampler(!1,!0,!0),t.fntBitmap)v.material=s.MaterialManager.getMaterialForBitmap(),v.style.image=t.fntBitmap;else if(t.format.bitmap&&0==this._textColor)v.material=s.MaterialManager.getMaterialForBitmap(!0),v.style.image=this._textFormats[0].bitmap,v.style.uvMatrix=new e.Matrix(0,0,0,0,t.format.uv_values[0],t.format.uv_values[1]);else{var x=this.getTextColorForTextFormat(t.format),w=new s.SolidFillStyle(x,e.ColorUtils.float32ColorToARGB(x)[0]/255||1),E=s.MaterialManager.getMaterialForColor(w);v.material=E,E.getNumTextures()&&(v.style.image=s.TextureAtlas.getTextureForColor(w),v.style.uvMatrix=w.getUVMatrix())}}}},r.prototype.buildShapes=function(){var t;for(var e in this.targetGraphics?this._graphics.clear():this.targetGraphics=this._graphics,this.targetGraphics.clear(),this.drawBG(),!this._border&&this._background||this.drawBorder(),this.drawSelectionGraphics(),this.bgShapeSelect&&this.isInFocus&&this.showSelection&&this.targetGraphics.addShape(this.bgShapeSelect),this.textShapes)(t=this.textShapes[e]).shape&&this.targetGraphics.addShape(t.shape);this.type===Z.INPUT&&this.isInFocus&&this.cursorShape&&!this.cursorBlinking&&this.targetGraphics.addShape(this.cursorShape)},r.prototype.appendText=function(t){t.length&&(this._iText+=t,this._textDirty=!0,this.invalidate())},r.prototype.closeParagraph=function(){this._iText+="\n",this._textDirty=!0,this.invalidate()},r.prototype.getCharBoundaries=function(t){var i=new e.Rectangle;return t>=this.char_positions_x.length||(i.x=this.char_positions_x[t],i.width=this.chars_width[t],i.y=this.char_positions_y[t],i.height=10),i},r.prototype.getCharIndexAtPoint=function(t,e,i){void 0===i&&(i=-1),i<0&&(i=this.getLineIndexAtPoint(t,e));for(var r=this.lines_charIdx_start[i],s=this.lines_charIdx_end[i],n=r;n<s;n++)if(t>=this.char_positions_x[n]){if(t<=this.char_positions_x[n]+this.chars_width[n]/2)return n;if(t<=this.char_positions_x[n]+this.chars_width[n])return n+1}return-1},r.prototype.getFirstCharInParagraph=function(t){return console.log("Textfield.getFirstCharInParagraph() not implemented"),this._firstCharInParagraph},r.prototype.getImageReference=function(t){return console.log("TextField.getImageReference() not implemented"),this._imageReference},r.prototype.getLineIndexAtPoint=function(t,e){for(var i=this.lines_start_y.length,r=0;r<i-1;r++)if(e>=this.lines_start_y[r]&&e<=this.lines_start_y[r+1])return r;return e>=this.lines_start_y[i-1]?i-1:0},r.prototype.getLineIndexOfChar=function(t){this.buildParagraphs();for(var e=this.lines_charIdx_start.length-1,i=void 0;i<e;i++)if(t>=this.lines_charIdx_start[i]&&t<=this.lines_charIdx_end[i+1])return i;return e},r.prototype.getLineLength=function(t){return 0==this.lines_width.length?0:t>=this.lines_width.length?this.lines_width[this.lines_width.length-1]:this.lines_width[t]},r.prototype.getLineMetrics=function(t){var e=new _t;return this.lines_width.length?(t>=this.lines_width.length&&(t=this.lines_width.length-1),e.x=this.lines_start_x[t],e.width=this.lines_width[t],e.height=this.lines_height[t],e):e},r.prototype.getLineOffset=function(t){return 0==this.lines_charIdx_start.length?0:t>=this.lines_charIdx_start.length?this.lines_charIdx_start[this.lines_charIdx_start.length-1]:this.lines_charIdx_start[t]},r.prototype.getLineText=function(t){return 0==this.lines_charIdx_start.length?"":(t>=this.lines_width.length&&(t=this.lines_width.length-1),this._iText.slice(this.lines_charIdx_start[t],this.lines_charIdx_end[t]))},r.prototype.getParagraphLength=function(t){return this._paragraphLength},r.prototype.getTextFormat=function(t,e){var i;if(void 0===t&&(t=-1),void 0===e&&(e=-1),!this.tf_per_char||!this.tf_per_char.length)return(null===(i=this._textFormats[0])||void 0===i?void 0:i.clone())||new dt;t<0&&(t=0),e>this.tf_per_char.length&&(e=this.tf_per_char.length);for(var r=this.tf_per_char[t].clone(),s=this.tf_per_char[t],n=t+1;n<e;n++)this.tf_per_char[n]!=s&&(r.mergeFormat(this.tf_per_char[n]),s=this.tf_per_char[n]);return r},r.prototype.replaceSelectedText=function(t){return this._insertNewText(t)},r.prototype.replaceText=function(t,e,i){var r=this._iTextWoLineBreaks.slice(0,t-1),s=this._iTextWoLineBreaks.slice(e,this._iTextWoLineBreaks.length);this.text=r+i+s,this._selectionEndIndex=this._selectionBeginIndex+i.length},r.prototype.setSelection=function(t,e){this._selectionBeginIndex==t&&this._selectionBeginIndex==e||(this._selectionBeginIndex=t,this._selectionEndIndex=e,this._glyphsDirty=!0,this.reConstruct(),this.drawSelectionGraphics())},r.prototype.setTextFormat=function(t,e,i){if(void 0===e&&(e=-1),void 0===i&&(i=-1),t&&0!=this._iTextWoLineBreaks.length){if(-1==e&&-1==i||0==e&&-1==i||(-1==e||0==e)&&i>=this._iTextWoLineBreaks.length){var r=this._textFormats.length;if(1===this._textFormats.length&&this._textFormats[0].equal(t))return;for(var s=0;s<r;s++)this._textFormats[s]=this._textFormats[s].clone(),t.applyToFormat(this._textFormats[s]);return this._textDirty=!0,void(this._textShapesDirty=!0)}var n,o=0,a=[],l=[],h=0,c=-1,u=this._textFormats.length,p=this._iTextWoLineBreaks.length;if(-1==e&&(e=0),-1==i&&(i=p),i<e){var d=i;i=e,e=d}i==e&&i++;for(var _=0;_<u;_++)if(_>0&&(h=c),c=this._textFormatsIdx[_],n=this._textFormats[_],h<=e&&c>e){for(h<e&&(a.push(n),l.push(e));c<i;){var f=this._textFormats[_].clone();t.applyToFormat(f),a.push(f),l.push(c),++_<u?(c=this._textFormatsIdx[_],n=this._textFormats[_]):c=i+1}if(c==i){f=n.clone();t.applyToFormat(f),a.push(f),l.push(i)}if(c>i){f=n.clone();t.applyToFormat(f),a.push(f),l.push(i),a.push(n),l.push(c)}}else a.push(this._textFormats[_]),l.push(this._textFormatsIdx[_]);for(this._textFormats.length=0,this._textFormatsIdx.length=0,o=0;o<a.length;o++)this._textFormats[o]=a[o],this._textFormatsIdx[o]=l[o];this._textDirty=!0,this._textShapesDirty=!0}},r.isFontCompatible=function(t,e){return!1},r.prototype.onKey=function(t){var e=t;this.addChar(e.char,e.isShift,e.isCTRL,e.isAlt)},r.prototype.addCharCode=function(t){this.addChar(String.fromCharCode(t))},r.prototype.deleteSelectedText=function(t){if(void 0===t&&(t="Backspace"),0!=this.text.length){if(this._selectionBeginIndex!=this._selectionEndIndex){var e=0!=this._selectionBeginIndex?this._iText.slice(0,this._selectionBeginIndex):"",i=this._selectionEndIndex<this._iText.length?this._iText.slice(this._selectionEndIndex,this._iText.length):"";return this.text=e+i,void(this._selectionEndIndex=this._selectionBeginIndex)}if("Backspace"==t){if(0==this._selectionBeginIndex)return;e=this._iText.slice(0,this._selectionBeginIndex-1),i=this._iText.slice(this._selectionEndIndex,this._iText.length);this.text=e+i,this._selectionBeginIndex-=1,this._selectionEndIndex=this._selectionBeginIndex}else if("Delete"==t){e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex+1,this._iText.length);this.text=e+i,this._selectionEndIndex=this._selectionBeginIndex}}},r.prototype.addChar=function(t,e,i,s){var n=this;void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=!1);var o=!1,a=this._iText;if(this._selectionBeginIndex||(this._selectionBeginIndex=0),this._selectionEndIndex||(this._selectionEndIndex=0),this._selectionEndIndex<this._selectionBeginIndex){var l=this._selectionEndIndex;this._selectionEndIndex=this._selectionBeginIndex,this._selectionBeginIndex=l}if(s||i)i&&!e&&"v"===t&&navigator.clipboard.readText&&navigator.clipboard.readText().then((function(t){n._insertNewText(t)})).catch((function(t){console.warn("[TextField] Can't paste text:",t.message)}));else{if("Backspace"==t||"Delete"==t)this.deleteSelectedText(t),o=!0;else if("ArrowRight"==t)e||this._selectionEndIndex==this._selectionBeginIndex?this._selectionEndIndex>this._selectionBeginIndex?(this._selectionEndIndex+=1,e||(this._selectionBeginIndex=this._selectionEndIndex)):(this._selectionBeginIndex+=1,e||(this._selectionEndIndex=this._selectionBeginIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionBeginIndex=this._selectionEndIndex:this._selectionEndIndex=this._selectionBeginIndex,o=!0;else if("ArrowLeft"==t)e||this._selectionEndIndex==this._selectionBeginIndex?this._selectionEndIndex>this._selectionBeginIndex?(this._selectionBeginIndex-=1,e||(this._selectionEndIndex=this._selectionBeginIndex)):(this._selectionEndIndex-=1,e||(this._selectionBeginIndex=this._selectionEndIndex)):this._selectionEndIndex>this._selectionBeginIndex?this._selectionEndIndex=this._selectionBeginIndex:this._selectionBeginIndex=this._selectionEndIndex,o=!0;else if("Enter"==t&&this.multiline)this._insertNewText("\n"),o=!0;else if(1==t.length){if(this._restrictRegex){var h=t.replace(this._restrictRegex,"");if(h.length<t.length){var c=t.toUpperCase().replace(this._restrictRegex,""),u=t.toLowerCase().replace(this._restrictRegex,"");t=c,c.length<u.length&&(t=u),h.length>t.length&&(t=h)}if(""==t)return}if(this._newTextFormat.font_table){var p=this._newTextFormat.font_table,d=t.charCodeAt(0).toString(),_=!1;if(!(_=(_=(_=_||p.hasChar(d))||p.hasChar(d.toLowerCase()))||p.hasChar(d.toUpperCase())))return void console.log("Char not found",d)}this._insertNewText(t),o=!0}else t.length>1&&console.log("invalid keyboard input: ",t);o&&(this._glyphsDirty=!0,this.invalidate(),a!==this._iText&&this.dispatchEvent(r._onChangedEvent))}if(t&&t.length>0&&this.adapter!=this){var f=void 0;switch(t){case"Backspace":f=8;break;case"Delete":f=46;break;case"ArrowRight":f=39;break;case"ArrowLeft":f=37;break;case".":f=189;break;default:f=t.charCodeAt(0)}this.adapter.dispatchKeyEvent(f,e,i,s)}},r.prototype._insertNewText=function(t){if(this._selectionBeginIndex!=this._selectionEndIndex){var e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex,this._iText.length);if(this.maxChars>0&&e.length+i.length+t.length>this.maxChars){var r=this.maxChars-e.length+i.length;r>0&&(t=t.slice(0,r))}this.text=e+t+i,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}else if(this.maxChars>0&&this._iText.length>=this.maxChars);else{e=this._iText.slice(0,this._selectionBeginIndex),i=this._iText.slice(this._selectionEndIndex,this._iText.length);this.text=e+t+i,this._textShapesDirty=!0,this._selectionBeginIndex+=1,this._selectionEndIndex=this._selectionBeginIndex}},r.prototype.clone=function(){var t=r.getNewTextField();return this.copyTo(t),t},r.prototype.copyTo=function(e){t.prototype.copyTo.call(this,e),e.autoSize=this.autoSize,e.type=this._type,e.html=this.html,e.width=this._width,e.height=this._height,e.newTextFormat=this._newTextFormat.clone(),e.textColor=this._textColor,e.border=this._border,e.borderColor=this._borderColor,e.background=this._background,e.backgroundColor=this._backgroundColor,e.textOffsetX=this.textOffsetX,e.textOffsetY=this.textOffsetY,e.staticMatrix=this.staticMatrix,e.selectable=this._selectable,e.multiline=this.multiline,e.wordWrap=this.wordWrap,e.maxChars=this.maxChars,e.sourceTextField=this,e.html?e.htmlText=this.htmlText:e.text=this.text,this._labelData&&e.setLabelData(this._labelData)},r.prototype._clearTextShapes=function(){var t;for(var e in this._textShapesDirty=!1,this._lastWordsCount=0,this.targetGraphics&&this.targetGraphics.clear(),this.textShapes)(t=this.textShapes[e]).shape&&t.shape.dispose(),t.shape=null,t.elements=null,t.length=0,delete this.textShapes[e]},r._textFields=[],r.assetType="[asset TextField]",r._onChangedEvent=new gt(gt.CHANGED),r}(m),Gt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e}(e.ErrorBase),zt=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.view=this.view,t.entity=this.entity,t},e.prototype._dispatchEvent=function(t){t.container.dispatchEvent(this),R.execute_queue()},e.FOCUS_IN="focusIn3d",e.FOCUS_OUT="focusOut3d",e}(e.EventBase),Wt=function(t){function e(e){var i=t.call(this,e)||this;return i.touchPointID=0,i}return l(e,t),e.prototype.clone=function(){var t=new e(this.type);return t.screenX=this.screenX,t.screenY=this.screenY,t.view=this.view,t.containerNode=this.containerNode,t.rootNode=this.rootNode,t.pickable=this.pickable,t.material=this.material,t.uv=this.uv,t.position=this.position,t.normal=this.normal,t.elementIndex=this.elementIndex,t.touchPointID=this.touchPointID,t.ctrlKey=this.ctrlKey,t.shiftKey=this.shiftKey,t._iParentEvent=this,t._iAllowedToPropagate=this._iAllowedToPropagate,t},e.prototype._dispatchEvent=function(t,i){t.isMouseDisabled()&&this.type!=e.TOUCH_OUT&&this.type!=e.TOUCH_ROLL_OUT||(t.container.dispatchEvent(this,i),R.execute_queue())},e.TOUCH_OVER="touchOver3d",e.TOUCH_OUT="touchOut3d",e.TOUCH_ROLL_OVER="touchRollOver3d",e.TOUCH_ROLL_OUT="touchRollOut3d",e.TOUCH_END="touchUp3d",e.TOUCH_BEGIN="touchDown3d",e.TOUCH_MOVE="touchMove3d",e.TOUCH_TAP="tap3d",e}(B),Yt=function(t){function e(e,i,r){void 0===i&&(i=NaN),void 0===r&&(r=NaN);var s=t.call(this,e)||this;return s._oldHeight=i,s._oldWidth=r,s}return l(e,t),Object.defineProperty(e.prototype,"oldHeight",{get:function(){return this._oldHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldWidth",{get:function(){return this._oldWidth},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.type,this._oldHeight,this._oldWidth)},e.RESIZE="resize",e}(e.EventBase),Xt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapMatsForBitmaps={},e.awaySymbols={},e}return l(e,t),e.prototype.createMovieClip=function(t,e){return void 0===t&&(t=null),new U(t||new x(this))},e.prototype.createSprite=function(t,e,i){return void 0===t&&(t=null),t?t.getNewObject():new y},e.prototype.createDisplayObjectContainer=function(t){return new m},e.prototype.createTextField=function(t){return new Ht},e.prototype.createBillboard=function(t,e){return new C(t)},e.prototype.createMaterial=function(t,e,i){return new o.MethodMaterial(t,e)},e.prototype.createFrameScripts=function(t,e,i,r){throw"[DefaultSceneGraphFactory] - createFrameScripts should be overwritten by AVM"},e.prototype.createChildInstanceForTimeline=function(t,e,i){throw"[DefaultSceneGraphFactory] - createChildInstanceForTimeline should be overwritten by AVM"},e}(i.DefaultStageFactory),Kt=new e.Point(0,0),Zt=function(t){function o(e,i,r,s,n,o){void 0===r&&(r=!0),void 0===s&&(s=4294967295),void 0===n&&(n=!0),void 0===o&&(o=null);var a=t.call(this,e,i,r,s,n,o)||this;return a._msaaNeedDrop=!1,a._enforceMSAASupport=!1,a._antialiasQuality=f.ALLOW_FORCE_MSAA,a._clearFromDispose=!1,a}return l(o,t),o.getImage=function(t,e,i,r,s,n,a){void 0===i&&(i=!0),void 0===r&&(r=4294967295),void 0===s&&(s=!0),void 0===n&&(n=null),void 0===a&&(a=!1);var l=new o(t,e,i,r,s,n);return a?l._enforceMSAASupport=!0:(l._msaaNeedDrop=!0,l._antialiasQuality=0),l},o.tryStoreImage=function(t,e){e.filterManager.pushTemp(t)},o.getTemp=function(t,e,i,r){void 0===r&&(r=!1);var s=i.filterManager.popTemp(t,e,r&&f.ALLOW_FORCE_MSAA>1);return s.antialiasQuality=r?f.ALLOW_FORCE_MSAA:0,s},o.prototype._dropMSAA=function(){!this._msaaNeedDrop&&this.canUseMSAAInternaly&&(this._enforceMSAASupport=!1,this._msaaNeedDrop=!0,this.wasUpload&&t.prototype.unload.call(this),console.debug("[SceneImage2D Experemental] Drop MSAA support because a setPixel* operation called after upload.",this.id))},Object.defineProperty(o.prototype,"canUseMSAAInternaly",{get:function(){if(this._enforceMSAASupport)return!0;var t=f.MSAA_MINIMAL_IMAGE_SIZE,e=f.MSAA_MINIMAL_IMAGE_SIZE;return this._stage&&(e=Math.min(this._stage.height,e),t=Math.min(this._stage.width,t)),this.width>=t&&this.height>=e&&!this._msaaNeedDrop},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"antialiasQuality",{get:function(){return this.canUseMSAAInternaly?this._antialiasQuality:0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"assetType",{get:function(){return o.assetType},enumerable:!1,configurable:!0}),o.prototype.createRenderer=function(){var t=new e.PerspectiveProjection;t.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,t.originX=-1,t.originY=1,t.transform=new e.Transform,t.transform.scaleTo(1,-1,1),t.transform.moveTo(0,0,-1e3),o._view=new r.View(t,this._stage),o._root=new m,o._rootNode=o._root.getNode(o._root),o._renderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(o._view,o._rootNode),o._view.backgroundAlpha=0,o._view.backgroundColor=0,o._renderer.disableClear=!0,o._renderer.renderableSorter=null},o.prototype.createBillboardRenderer=function(){var t=new e.PerspectiveProjection;t.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,t.originX=-1,t.originY=1,t.transform=new e.Transform,t.transform.moveTo(0,0,-1e3),t.transform.lookAt(new e.Vector3D),o._billboardView=new r.View(t,this._stage),o._billboardRoot=new m,o._billboardRootNode=o._billboardRoot.getNode(o._billboardRoot),o._billboardRenderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(o._billboardView,o._billboardRootNode),o._billboardView.backgroundAlpha=0,o._billboardView.backgroundColor=0,o._billboardRenderer.disableClear=!0,o._billboardRenderer.renderableSorter=null,o._billboard=new C(s.MaterialManager.getMaterialForBitmap()),o._billboardRoot.addChild(o._billboard)},o.prototype.dispose=function(){this._clearFromDispose=!0,this.unmarkToUnload(),this.unuseWeakRef(),this._data=null,this._locked=!1,t.prototype.dispose.call(this),this._clearFromDispose=!1},o.prototype.unload=function(){var e=this;if(this._imageDataDirty){var i=this.syncData(!0);if("boolean"!=typeof i)return void i.then((function(){return t.prototype.unload.call(e)}))}t.prototype.unload.call(this)},o.prototype.copyTo=function(t){t.copyPixels(this,t.rect,new e.Point(0,0))},o.prototype.copyPixels=function(t,i,r,s,n,o){if(this._lastUsedFill=null,this.unmarkToUnload(),o=this.transparent!==t.transparent||o,!t._imageDataDirty&&i.equals(this._rect)&&this._rect.equals(t.rect)&&!o&&(!this.wasUpload||!t.wasUpload)){var a=t.getDataInternal(!0);return this._data?this._data.set(a):this._data=a.slice(),this._unpackPMA=t._unpackPMA,this._initalFillColor=null,this._imageDataDirty=!1,void this.invalidateGPU()}t.width,t.height,f.CPU_COPY_PIXELS_COUNT,null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor);var l=t;s&&(l=this._stage.filterManager.popTemp(t.width,t.height),this._stage.filterManager.copyPixels(s,l,new e.Rectangle(n.x,n.y,i.width,i.height),new e.Point(0,0)),this._stage.filterManager.copyPixels(t,l,t.rect,new e.Point(0,0),!0,"alpha_back")),this._stage.filterManager.copyPixels(l,this,i,r,o),s&&this._stage.filterManager.pushTemp(l),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.threshold=function(t,e,i,r,s,n,o,a){this._lastUsedFill=null,this.unmarkToUnload(),null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor),this._stage.threshold(t,this,e,i,r,s,n,o,a),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.applyFilter=function(t,e,i,r){if(!f.USE_UNSAFE_FILTERS||!r||!r.filterName)return!1;var s=this._stage.filterManager.applyFilter(t,this,e,i,r.filterName,r);return this._imageDataDirty=s,s&&this.invalidateOwners(),s},o.prototype.colorTransform=function(t,e){this.unmarkToUnload(),this._lastUsedFill=null,this._stage.colorTransform(this,this,t,e),this._imageDataDirty=!0,this.invalidateOwners()},o.prototype.setPixel=function(e,i,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel.call(this,e,i,r)},o.prototype.setPixel32=function(e,i,r){this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixel32.call(this,e,i,r)},o.prototype.setPixels=function(e,i){this.wasUpload&&this.canUseMSAAInternaly&&this._dropMSAA(),t.prototype.setPixels.call(this,e,i)},o.prototype.getPixels=function(e){return this.syncData(),t.prototype.getPixels.call(this,e)},o.prototype.clear=function(){var e=this;if(this._clearFromDispose)t.prototype.clear.call(this);else{var i=this.syncData(!0);if(this.unmarkToUnload(),this.lastUsedTime=-1,"boolean"==typeof i)return this.wasUpload=!1,void t.prototype.clear.call(this);i.then((function(){e.wasUpload=!1,t.prototype.clear.call(e)}))}},o.prototype.getPixel32=function(e,i){return this.syncData(),t.prototype.getPixel32.call(this,e,i)},o.prototype.getPixel=function(t,e){return 16777215&this.getPixel32(t,e)},o.prototype.draw=function(t,e,i,r,s,n){this.unmarkToUnload(),t instanceof g?this._drawAsDisplay(t,e,i,r,s,n):this._drawAsBitmap(t,e,i,r,s,n),this._lastUsedFill=null,this._imageDataDirty=!0,this.invalidateOwners()},o._mapSupportedBlendMode=function(t){switch(void 0===t&&(t=""),t){case null:case"":case i.BlendMode.NORMAL:case i.BlendMode.LAYER:return i.BlendMode.LAYER;case i.BlendMode.MULTIPLY:case i.BlendMode.ADD:case i.BlendMode.ALPHA:return t}return i.BlendMode.LAYER},o.prototype._drawAsBitmap=function(t,e,r,s,n,a){s=s||i.BlendMode.LAYER,o._billboardRenderer||this.createBillboardRenderer(),null!==this._initalFillColor&&this.fillRect(this._rect,this._initalFillColor);var l=this._stage,h=o._mapSupportedBlendMode(s),c=!(!s||h!==i.BlendMode.LAYER||s==i.BlendMode.LAYER)||this===t,u=c?l.filterManager.popTemp(this.width,this.height,!1):this,p=o._billboardRenderer,d=o._billboardRoot,_=o._billboard;if(_.style.sampler.smooth=a,p.disableClear=!c,p.view.target=u,p.view.projection.scale=1e3/u.height,_.style.image=t,_.material.blendMode=c?i.BlendMode.LAYER:h,_.material.useColorTransform=!!r,c&&(p.view.backgroundColor=0,p.view.backgroundAlpha=0),e){var f=d.transform.matrix3D;f.identity(),f._rawData[0]=e.a,f._rawData[1]=-e.b,f._rawData[4]=e.c,f._rawData[5]=-e.d,f._rawData[12]=e.tx,f._rawData[13]=u.height-e.ty,d.transform.invalidateComponents()}else d.transform.rotateTo(0,0,0),d.transform.scaleTo(1,-1,1),d.transform.moveTo(0,u.height,0);d.transform.colorTransform=r,p.render(),c&&(l.filterManager.copyPixels(u,this,this.rect,Kt,!0,s),l.filterManager.pushTemp(u)),_.material.blendMode=i.BlendMode.NORMAL},o.prototype._drawAsDisplay=function(t,r,s,n,a,l){void 0===n&&(n=""),n=n||i.BlendMode.LAYER,o._renderer||this.createRenderer();var h=o._root,c=o._rootNode,u=o._renderer,p=this.canUseMSAAInternaly,d=!t.isAsset(C)&&2===this._stage.context.glVersion&&f.ALLOW_FORCE_MSAA>1&&!p,_=this,g=n!==i.BlendMode.LAYER||null===this._lastUsedFill&&d,m=g||d;if(d&&!g||null===this._initalFillColor?this._initalFillColor=null:this.fillRect(this._rect,this._initalFillColor),m)if(_=o.getTemp(this.width,this.height,this._stage,d),g||null===this._lastUsedFill)u.disableClear=!1,u.view.backgroundColor=0,u.view.backgroundAlpha=0;else{if(this._transparent){var y=e.ColorUtils.float32ColorToARGB(this._lastUsedFill),b=y[0],v=y[1],x=y[2],w=y[3];b/=255,this._lastUsedFill=e.ColorUtils.ARGBtoFloat32(255*b,v*b|0,x*b|0,w*b|0)}u.disableClear=!1,u.view.backgroundColor=16777215&this._lastUsedFill,u.view.backgroundAlpha=this._transparent?(this._lastUsedFill>>>24&255)/255:1}var E=u.view.projection.transform,A=E.matrix3D;if(A.identity(),r){var D=A._rawData;D[0]=r.a,D[1]=r.b,D[4]=r.c,D[5]=r.d,D[10]=1,D[12]=r.tx,D[13]=r.ty}A.appendScale(1,-1,1),A.appendTranslation(0,this._rect.height,1e3),A.invert(),E.matrix3D=A,u.antiAlias=(p?this.antialiasQuality:_.antialiasQuality)||0,u.view.target=_,u.view.projection.scale=1e3/this._rect.height,u.view.projection.ratio=this._rect.width/this._rect.height,u.view.x=-(_.width-this.width),u.view.y=-(_.height-this.height),u.view.width=this.width,u.view.height=this.height;var T=c.addChildAt(t,0),S=T.transformDisabled;T.transformDisabled=!0,h.transform.colorTransform=s,h.blendMode=o._mapSupportedBlendMode(n),u.render(),u.antiAlias=0,u.disableClear=!0,c.removeChildAt(0),T.transformDisabled=S,m&&(this._stage.filterManager.copyPixels(_,this,this._rect,Kt,g,n),o.tryStoreImage(_,this._stage))},o.prototype.reset=function(){},o.prototype.clone=function(){var t=o.getImage(this.width,this.height,this.transparent,null,!1,this._stage,!1);return this.copyTo(t),t},o.assetType="[image SceneImage2D]",o}(i.BitmapImage2D);i.Stage.registerAbstraction(i._Stage_BitmapImage2D,Zt);var Jt=function(){function t(t){this._pickerLookup=new Array,this._pointerDataArray={},this.allowKeyInput=!0,this._eventBubbling=!0,this._allowFocusOnUnfocusable=!0,this._cursorType="auto",this._nullVector=new e.Vector3D,this._dragOut=new q(q.DRAG_OUT),this._dragOver=new q(q.DRAG_OVER),this._dragMove=new q(q.DRAG_MOVE),this._dragStart=new q(q.DRAG_START),this._dragStop=new q(q.DRAG_STOP),this._focusIn=new zt(zt.FOCUS_IN),this._focusOut=new zt(zt.FOCUS_OUT),this._useSoftkeyboard=!1,this._isAVM1Dragging=!1,this._stage=t,this.onDoubleClick=this.onDoubleClick.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this._showCursor=!0;var i=this._stage.container;i.addEventListener("touchstart",this.onMouseDown),i.addEventListener("mousedown",this.onMouseDown),window.addEventListener("touchmove",this.onMouseMove),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),i.addEventListener("touchend",this.onMouseUp),i.addEventListener("mousewheel",this.onMouseWheel),i.addEventListener("mouseover",this.onMouseOver),i.addEventListener("mouseout",this.onMouseOut),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),i.addEventListener("contextmenu",(function(t){return t.preventDefault()}))}return t.prototype.startDragObject=function(t,e){void 0===e&&(e=!1),this._isAVM1Dragging=e,t&&((this._pointerDataArray[0]||(this._pointerDataArray[0]=new Qt(0,!0))).dragCollision=t)},t.prototype.stopDragObject=function(){this._isAVM1Dragging=!1},Object.defineProperty(t.prototype,"showCursor",{get:function(){return this._showCursor},set:function(t){this._showCursor=t,this.cursorType=this._cursorType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorType",{get:function(){return this._cursorType},set:function(t){this._cursorType=t,this._stage.container.style.cursor=this._showCursor?t:"none"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eventBubbling",{get:function(){return this._eventBubbling},set:function(t){this._eventBubbling=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useSoftkeyboard",{get:function(){return this._useSoftkeyboard},set:function(t){this._useSoftkeyboard=t,t?t&&(window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)):(window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp))},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t=this._stage.container;t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("touchstart",this.onMouseDown),t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("touchmove",this.onMouseMove),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchend",this.onMouseUp),t.removeEventListener("wheel",this.onMouseWheel),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),this._stage=null,this._dragOut=null,this._dragOver=null,this._dragMove=null,this._dragStart=null,this._dragStop=null},t.clearInstance=function(t){this._instancePool[t.id]&&(this._instancePool[t.id].dispose(),delete this._instancePool[t.id])},t.getInstance=function(e){return this._instancePool[e.id]||(this._instancePool[e.id]=new t(e))},t.prototype.setFocus=function(t){this._focusNode!=t&&(this._allowFocusOnUnfocusable||this._focusNode.container.tabEnabled)&&(this._focusNode&&this._focusNode.container&&(this.dispatchEvent(this._focusOut,this._focusNode),this._focusNode.container.setFocus(!1,!0)),this._focusNode=t,this._focusNode&&(this.dispatchEvent(this._focusIn,this._focusNode),this._focusNode.container.setFocus(!0,!0)))},t.prototype.getFocus=function(){return this._focusNode},t.prototype.dispatchEvent=function(t,e){if(this._eventBubbling){for(var i=null==e?void 0:e.container,r=[],s=e;s&&(!t.commonAncestor||s!=t.commonAncestor);s=s.parent)r.push(s);for(var n=0,o=r;n<o.length;n++){s=o[n];if(t._dispatchEvent(s,i),!t._iAllowedToPropagate)break}}else e&&t._dispatchEvent(e,e.container)},t.prototype.setupAndDispatchEvent=function(t,e,i,r){void 0===r&&(r=null);var s=e.sourceEvent;s&&(t instanceof q&&(t.delta=s.deltaY,t.buttons=s.buttons),t.ctrlKey=s.ctrlKey,t.altKey=s.altKey,t.shiftKey=s.shiftKey),t=this.setUpEvent(t,e,i,r),this.dispatchEvent(t,t.rootNode)},t.prototype.fireMouseEvents=function(t){if(void 0===t&&(t=null),t||this._updateDirty)for(var e in this._pointerDataArray)this._fireMouseEventsInternal(this._pointerDataArray[e],t)},t.prototype._fireMouseEventsInternal=function(t,e){var i,r,s,n,o,a;if(void 0===e&&(e=null),e)n=e.getViewCollision(t.screenX,t.screenY);else if(this._updateDirty)for(var l=0;l<this._pickerLookup.length;l++)n&&!this._pickerLookup[l].layeredView||(n=this._pickerLookup[l].getViewCollision(t.screenX,t.screenY,!1,n));var h=t.queuedEvents.length;for(l=0;l<h;++l)if(o=t.queuedEvents[l],a=null==n?void 0:n.rootNode,this.setUpEvent(o,t,n),o.type==t.down.type)this._eventBubbling||this._stage.dispatchEvent(o),t.isMouse||this.setupAndDispatchEvent(t.over,t,n),0==t.id&&(t.dragCollision=n),a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),t.dragCollision&&(this.setFocus(t.dragCollision.rootNode),this.setupAndDispatchEvent(this._dragStart,t,t.dragCollision));else if(o.type==t.up.type){this._eventBubbling||this._stage.dispatchEvent(o);var c=null,u=null;this._isAVM1Dragging&&t.dragCollision?(u=t.dragCollision.rootNode,c=t.dragCollision.containerNode):t.dragCollision&&t.dragCollision.rootNode!=a||t.dragCollision&&t.dragCollision.rootNode==a&&(u=t.dragCollision.rootNode,c=t.dragCollision.containerNode),u?this.dispatchEvent(o,u):a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),c?(this._isAVM1Dragging||this.setupAndDispatchEvent(t.click,t,t.dragCollision),this.setupAndDispatchEvent(this._dragStop,t,t.dragCollision)):t.dragCollision&&this.setupAndDispatchEvent(t.upOutside,t,t.dragCollision),t.dragCollision=null,this._isAVM1Dragging=!1,0!=t.id&&delete this._pointerDataArray[t.id]}else o.type==t.move.type?(this._eventBubbling||this._stage.dispatchEvent(o),a?this.dispatchEvent(o,a):this._eventBubbling&&this._stage.dispatchEvent(o),t.dragCollision&&this.setupAndDispatchEvent(this._dragMove,t,t.dragCollision)):this.dispatchEvent(o,a);t.queuedEvents.length=0,t.rollOut.commonAncestor=null,t.rollOver.commonAncestor=null;var p=null==n?void 0:n.rootNode,d=null===(i=t.prevCollision)||void 0===i?void 0:i.rootNode;if(p!=d){if(d&&(this.setupAndDispatchEvent(t.out,t,t.prevCollision),(null===(r=t.dragCollision)||void 0===r?void 0:r.rootNode)==d&&this.setupAndDispatchEvent(this._dragOut,t,t.prevCollision)),!d&&p&&(this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision),this.setupAndDispatchEvent(t.rollOver,t,n)),d&&!p&&(this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision),this.setupAndDispatchEvent(t.rollOver,t,n)),d&&p){for(var _=[],f=d;f&&!f.container.isAVMScene;)_.push(f),f=f.parent;var g=null;for(f=p;f&&!f.container.isAVMScene;){-1==_.indexOf(f)?f=f.parent:(g=f,f=null)}g!=d&&this.setupAndDispatchEvent(t.rollOut,t,t.prevCollision,g),g!=p&&this.setupAndDispatchEvent(t.rollOver,t,n,g)}t.collisionIsEnabledButton=!!p&&p.buttonEnabled,p&&(this.setupAndDispatchEvent(t.over,t,n),t.dragCollision&&this.setupAndDispatchEvent(this._dragOver,t,n)),t.prevCollision=n}else{var m=!!p&&p.buttonEnabled;t.collisionIsEnabledButton!=m&&m&&(t.isMouse?this.setupAndDispatchEvent(t.over,t,n):(null===(s=t.dragCollision)||void 0===s?void 0:s.rootNode)==p&&this.setupAndDispatchEvent(this._dragOver,t,n)),t.collisionIsEnabledButton=m}t.dragCollision||(this.cursorType=p?p.container.getMouseCursor():"auto"),this._updateDirty=!1},t.prototype.registerPicker=function(t){this._pickerLookup.push(t)},t.prototype.unregisterPicker=function(t){this._pickerLookup.splice(this._pickerLookup.indexOf(t),1)},t.prototype.addEventsForSceneBinary=function(t,e){var i={clientX:null,clientY:null,touches:[],changedTouches:[],preventDefault:function(){}},r=new Float32Array(t),s=0,n=0;n++;var o=r[n++],a=r[n++],l=r[n++];if(1!=a&&6!=a&&12!=a&&262!=a&&518!=a){for(s=0;s<o;s++){(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h}i.changedTouches[0]=i.touches[l]}else{if(1==o)(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.clientX=h.clientX,i.clientY=h.clientY;else for(s=0;s<o;s++){var h;(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],s!=l?i.touches[0]=h:(i.clientX=h.clientX,i.clientY=h.clientY)}}0==a||5==a||11==a||261==a||517==a?this.onMouseDown(i):1==a||6==a||12==a||262==a||518==a?this.onMouseUp(i):2==a?this.onMouseMove(i):console.log("recieved unknown touch event-type: "+a)},t.prototype.fireEventsForSceneFromString=function(t,e){var i={clientX:null,clientY:null,preventDefault:function(){}},r=t.split(","),s=0,n=0,o=parseInt(r[n++]),a=parseInt(r[n++]),l=parseInt(r[n++]);if(i.touches=[],i.changedTouches=[],1!=a&&6!=a){for(s=0;s<o;s++){(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h,i.changedTouches[s]=h}i.changedTouches[s]=i.touches[l]}else for(s=0;s<o;s++){var h;if(s!=l)(h={}).identifier=r[n++],h.clientX=r[n++],h.clientY=r[n++],i.touches[s]=h,i.changedTouches[s]=h;else i.clientX=r[n++],i.clientY=r[n++],n++}0==a?this.onMouseDown(i):1==a?this.onMouseUp(i):2==a?this.onMouseMove(i):261==a?this.onMouseDown(i):6==a&&this.onMouseUp(i)},t.prototype.setUpEvent=function(t,e,i,r){var s,n;return void 0===r&&(r=null),t._iAllowedToImmediatlyPropagate=!0,t._iAllowedToPropagate=!0,t.screenX=e.screenX,t.screenY=e.screenY,t instanceof Wt&&(t.touchPointID=e.id),i?(t.containerNode=i.containerNode,t.rootNode=i.rootNode,t.pickable=i.pickable,t.uv=i.uv,t.position=null===(s=i.position)||void 0===s?void 0:s.clone(),t.normal=null===(n=i.normal)||void 0===n?void 0:n.clone(),t.elementIndex=i.elementIndex):(t.containerNode=null,t.rootNode=null,t.pickable=null,t.uv=null,t.position=this._nullVector,t.normal=this._nullVector,t.elementIndex=0),t.commonAncestor=r,t},t.prototype.queueDispatch=function(t,e,i){e instanceof q&&(e.delta=i instanceof WheelEvent?-3*i.deltaY/100:0,e.buttons=i instanceof MouseEvent?i.buttons:0),e.ctrlKey=i.ctrlKey,e.altKey=i.altKey,e.shiftKey=i.shiftKey;var r=t.queuedEvents.indexOf(e);-1!=r&&t.queuedEvents.splice(r,1),t.queuedEvents.push(e),t.sourceEvent=i},t.prototype.onKeyDown=function(e){if(!t.inputRecorder||t.inputRecorder.recordEvent(e),this.allowKeyInput){switch(e.keyCode){case 32:case 37:case 39:case 38:case 40:e.preventDefault()}if(this._focusNode||this._stage){var i=new ft(ft.KEYDOWN,e.key,e.code);i.isShift=e.shiftKey,i.isCTRL=e.ctrlKey,i.isAlt=e.altKey,i.keyCode=e.keyCode,this._focusNode&&this._focusNode.container.dispatchEvent(i),this._stage&&this._stage.dispatchEvent(i)}}},t.prototype.onKeyUp=function(e){if(!t.inputRecorder||t.inputRecorder.recordEvent(e),this.allowKeyInput){switch(e.keyCode){case 32:case 37:case 39:case 38:case 40:e.preventDefault()}if(this._focusNode||this._stage){var i=new ft(ft.KEYUP,e.key,e.code);i.isShift=e.shiftKey,i.isCTRL=e.ctrlKey,i.isAlt=e.altKey,i.keyCode=e.keyCode,this._focusNode&&this._focusNode.container.dispatchEvent(i),this._stage&&this._stage.dispatchEvent(i)}}},t.prototype.onMouseMove=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onMouseOut=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onMouseOver=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.onDoubleClick=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e),e instanceof MouseEvent&&6&e.buttons&&e.preventDefault()},t.prototype.onMouseDown=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e);var i="mousedown"!==e.type;e instanceof MouseEvent&&6&e.buttons&&(i=!0),i&&(e.preventDefault(),this._stage.container.focus())},t.prototype.onMouseUp=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e);var i="mouseup"!==e.type;e instanceof MouseEvent&&1===e.button&&(i=!0),i&&(e.preventDefault(),this._stage.container.focus())},t.prototype.onMouseWheel=function(e){!t.inputRecorder||t.inputRecorder.recordEvent(e),this.updateColliders(e)},t.prototype.updateColliders=function(e){this._stage.interactionHandler(e),this._updateDirty=!0;var i=this._pointerDataArray[0]||(this._pointerDataArray[0]=new Qt(0,!0));i.isMouse=e instanceof MouseEvent;var r=i.isMouse?e.type:t._touchToMouseDict[e.type];if(this.queueDispatch(i,t._pointerDict[r],e),i.screenX=this._stage.screenX,i.screenY=this._stage.screenY,e.changedTouches)for(var s=0;s<e.changedTouches.length;s++){var n=e.changedTouches[s],o=this._pointerDataArray[n.identifier]||(this._pointerDataArray[n.identifier]=new Qt(n.identifier)),a=this._stage.mapWindowToStage(n.clientX,n.clientY);o.screenX=a.x,o.screenY=a.y,this.queueDispatch(o,t._pointerDict[e.type],e)}},t._instancePool={},t._touchToMouseDict={touchstart:"mousedown",touchend:"mouseup",touchmove:"mousemove"},t._pointerDict={mouseup:new q(q.MOUSE_UP),mouseupoutside:new q(q.MOUSE_UP_OUTSIDE),click:new q(q.CLICK),mouseout:new q(q.MOUSE_OUT),mousedown:new q(q.MOUSE_DOWN),mousemove:new q(q.MOUSE_MOVE),mouseover:new q(q.MOUSE_OVER),mousewheel:new q(q.MOUSE_WHEEL),dblclick:new q(q.DOUBLE_CLICK),rollover:new q(q.ROLL_OVER),rollout:new q(q.ROLL_OUT),touchend:new Wt(Wt.TOUCH_END),touchtap:new Wt(Wt.TOUCH_TAP),touchout:new Wt(Wt.TOUCH_OUT),touchstart:new Wt(Wt.TOUCH_BEGIN),touchmove:new Wt(Wt.TOUCH_MOVE),touchover:new Wt(Wt.TOUCH_OVER),touchrollover:new Wt(Wt.TOUCH_ROLL_OVER),touchrollout:new Wt(Wt.TOUCH_ROLL_OUT)},t}(),Qt=function(t,e){void 0===e&&(e=!1),this.id=t,this.isMouse=e,this.collisionIsEnabledButton=!1,this.queuedEvents=new Array,e?(this.up=Jt._pointerDict.mouseup,this.upOutside=Jt._pointerDict.mouseupoutside,this.click=Jt._pointerDict.click,this.out=Jt._pointerDict.mouseout,this.down=Jt._pointerDict.mousedown,this.move=Jt._pointerDict.mousemove,this.over=Jt._pointerDict.mouseover,this.wheel=Jt._pointerDict.mousewheel,this.doubleClick=Jt._pointerDict.dblclick,this.rollOver=Jt._pointerDict.rollover,this.rollOut=Jt._pointerDict.rollout):(this.up=Jt._pointerDict.touchend,this.click=Jt._pointerDict.touchtap,this.out=Jt._pointerDict.touchout,this.down=Jt._pointerDict.touchstart,this.move=Jt._pointerDict.touchmove,this.over=Jt._pointerDict.touchover,this.rollOver=Jt._pointerDict.touchrollover,this.rollOut=Jt._pointerDict.touchrollout)},$t=function(t){function e(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=100),void 0===n&&(n=16),void 0===o&&(o=15),void 0===a&&(a=!0);var l=t.call(this,e,i)||this;return l._numVertices=0,l._radius=r,l._height=s,l._segmentsW=n,l._segmentsH=o%2==0?o+1:o,l._yUp=a,l}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t%2==0?t+1:t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f=0,g=0,m=0;if(e==n.ElementsType.TRIANGLE){var y=t;for(this._numVertices=(this._segmentsH+1)*(this._segmentsW+1),m=(this._segmentsH-1)*this._segmentsW*6,this._numVertices==y.numVertices?(y.invalidateIndices(),y.invalidateVertices(y.positions),y.invalidateVertices(y.normals),y.invalidateVertices(y.tangents)):(y.setIndices(new Uint16Array(m)),y.setPositions(new Float32Array(3*this._numVertices)),y.setNormals(new Float32Array(3*this._numVertices)),y.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=y.indices.get(y.numElements),r=y.positions.get(this._numVertices),s=y.normals.get(this._numVertices),o=y.tangents.get(this._numVertices),a=y.concatenatedBuffer.stride/4,h=0;h<=this._segmentsH;++h){var b=Math.PI*h/this._segmentsH,v=-this._radius*Math.cos(b),x=this._radius*Math.sin(b);for(c=g,l=0;l<=this._segmentsW;++l){var w=2*Math.PI*l/this._segmentsW,E=x*Math.cos(w),A=h>this._segmentsH/2?this._height/2:-this._height/2,D=x*Math.sin(w),T=1/Math.sqrt(E*E+D*D+v*v),S=Math.sqrt(D*D+E*E);if(this._yUp?(d=0,_=S>.007?E/S:0,u=-v,p=D):(d=S>.007?E/S:0,_=0,u=D,p=v),l==this._segmentsW?(r[g]=r[c],r[g+1]=r[c+1],r[g+2]=r[c+2],s[g]=.5*(s[c]+E*T),s[g+1]=.5*(s[c+1]+u*T),s[g+2]=.5*(s[c+2]+p*T),o[g]=.5*(o[c]+(S>.007?-D/S:1)),o[g+1]=.5*(o[c+1]+d),o[g+2]=.5*(o[c+2]+_)):(r[g]=E,r[g+1]=this._yUp?u-A:u,r[g+2]=this._yUp?p:p+A,s[g]=E*T,s[g+1]=u*T,s[g+2]=p*T,o[g]=S>.007?-D/S:1,o[g+1]=d,o[g+2]=_),l>0&&h>0){var C=(this._segmentsW+1)*h+l,P=(this._segmentsW+1)*h+l-1,I=(this._segmentsW+1)*(h-1)+l-1,O=(this._segmentsW+1)*(h-1)+l;h==this._segmentsH?(r[g]=r[c],r[g+1]=r[c+1],r[g+2]=r[c+2],i[f++]=C,i[f++]=I,i[f++]=O):1==h?(i[f++]=C,i[f++]=P,i[f++]=I):(i[f++]=C,i[f++]=P,i[f++]=I,i[f++]=C,i[f++]=I,i[f++]=O)}g+=a}}}else n.ElementsType.LINE},e.prototype._pBuildUVs=function(t,e){var i,r,s,o;if(e==n.ElementsType.TRIANGLE){var a=t;a.uvs&&this._numVertices==a.numVertices?a.invalidateVertices(a.uvs):a.setUVs(new Float32Array(2*this._numVertices)),s=a.uvs.get(this._numVertices),o=a.uvs.stride;var l=0;for(r=0;r<=this._segmentsH;++r)for(i=0;i<=this._segmentsW;++i)s[l]=i/this._segmentsW*this._scaleU,s[l+1]=r/this._segmentsH*this._scaleV,l+=o}else n.ElementsType.LINE},e}(p),te=function(t){function e(e,i,r,s,n,o,a,l,h,c,u){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=50),void 0===n&&(n=100),void 0===o&&(o=16),void 0===a&&(a=1),void 0===l&&(l=!0),void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0);var p=t.call(this,e,i)||this;return p._numVertices=0,p._topRadius=r,p._pBottomRadius=s,p._height=n,p._pSegmentsW=o,p._pSegmentsH=a,p._topClosed=l,p._bottomClosed=h,p._surfaceClosed=c,p._yUp=u,p}return l(e,t),Object.defineProperty(e.prototype,"topRadius",{get:function(){return this._topRadius},set:function(t){this._topRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomRadius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._pSegmentsW},set:function(t){this.setSegmentsW(t)},enumerable:!1,configurable:!0}),e.prototype.setSegmentsW=function(t){this._pSegmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._pSegmentsH},set:function(t){this.setSegmentsH(t)},enumerable:!1,configurable:!0}),e.prototype.setSegmentsH=function(t){this._pSegmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},Object.defineProperty(e.prototype,"topClosed",{get:function(){return this._topClosed},set:function(t){this._topClosed=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomClosed",{get:function(){return this._bottomClosed},set:function(t){this._bottomClosed=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v,x,w,E,A=0,D=0,T=0,S=0;this._numVertices=0;var C=2*Math.PI/this._pSegmentsW;if(e==n.ElementsType.TRIANGLE){var P=t;if(this._surfaceClosed&&(this._numVertices+=(this._pSegmentsH+1)*(this._pSegmentsW+1),A+=this._pSegmentsH*this._pSegmentsW*6),this._topClosed&&(this._numVertices+=2*(this._pSegmentsW+1),A+=3*this._pSegmentsW),this._bottomClosed&&(this._numVertices+=2*(this._pSegmentsW+1),A+=3*this._pSegmentsW),this._numVertices==P.numVertices?(P.positions.invalidate(),P.normals.invalidate(),P.tangents.invalidate(),P.indices.invalidate()):(P.setIndices(new Uint16Array(A)),P.setPositions(new Float32Array(3*this._numVertices)),P.setNormals(new Float32Array(3*this._numVertices)),P.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=P.indices.get(P.numElements),r=P.positions.get(this._numVertices),s=P.normals.get(this._numVertices),o=P.tangents.get(this._numVertices),a=P.concatenatedBuffer.stride/4,d=0,_=0,this._topClosed&&this._topRadius>0)for(p=-.5*this._height,this._yUp?(w=1,E=0,v=-p,x=0):(w=0,E=-1,v=0,x=p),r[d]=0,r[d+1]=v,r[d+2]=x,s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,T++,l=0;l<=this._pSegmentsW;++l)g=l*C,c=this._topRadius*Math.cos(g),u=this._topRadius*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l==this._pSegmentsW?(r[d]=r[D+a],r[d+1]=r[D+a+1],r[d+2]=r[D+a+2]):(r[d]=c,r[d+1]=v,r[d+2]=x),s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,l>0&&(i[_++]=T-1,i[_++]=S,i[_++]=T),T++;if(this._bottomClosed&&this._pBottomRadius>0)for(p=.5*this._height,D=T*a,S=T,this._yUp?(w=-1,E=0,v=-p,x=0):(w=0,E=1,v=0,x=p),l>0&&(r[d]=0,r[d+1]=v,r[d+2]=x,s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a),T++,l=0;l<=this._pSegmentsW;++l)g=l*C,c=this._pBottomRadius*Math.cos(g),u=this._pBottomRadius*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l==this._pSegmentsW?(r[d]=r[D+a],r[d+1]=r[D+a+1],r[d+2]=r[D+a+2]):(r[d]=c,r[d+1]=v,r[d+2]=x),s[d]=0,s[d+1]=w,s[d+2]=E,o[d]=1,o[d+1]=0,o[d+2]=0,d+=a,l>0&&(i[_++]=T-1,i[_++]=T,i[_++]=S),T++;if(b=0==(y=(m=this._pBottomRadius-this._topRadius)/this._height)?1:this._height/m,this._surfaceClosed){var I=void 0,O=void 0,N=void 0,L=void 0,M=void 0,F=void 0,k=void 0,R=void 0;for(h=0;h<=this._pSegmentsH;++h)for(f=this._topRadius-h/this._pSegmentsH*(this._topRadius-this._pBottomRadius),p=-this._height/2+h/this._pSegmentsH*this._height,D=T*a,l=0;l<=this._pSegmentsW;++l)g=l*C,c=f*Math.cos(g),u=f*Math.sin(g),M=b*Math.cos(g),F=b*Math.sin(g),this._yUp?(w=0,E=-M,v=-p,x=u,k=y,R=F):(w=-M,E=0,v=u,x=p,k=F,R=y),l==this._pSegmentsW?(r[d]=r[D],r[d+1]=r[D+1],r[d+2]=r[D+2],s[d]=M,s[d+1]=y,s[d+2]=F,o[d]=F,o[d+1]=w,o[d+2]=E):(r[d]=c,r[d+1]=v,r[d+2]=x,s[d]=M,s[d+1]=k,s[d+2]=R,o[d]=-F,o[d+1]=w,o[d+2]=E),d+=a,l>0&&h>0&&(I=T,N=(O=T-1)-this._pSegmentsW-1,L=I-this._pSegmentsW-1,i[_++]=I,i[_++]=O,i[_++]=N,i[_++]=I,i[_++]=N,i[_++]=L),T++}}else if(e==n.ElementsType.LINE){var B=t,q=this._pSegmentsH*this._pSegmentsW*2+this._pSegmentsW;r=new Float32Array(6*q);var U=new Float32Array(q);for(d=0,_=0,h=0;h<=this._pSegmentsH;++h)for(f=this._topRadius-h/this._pSegmentsH*(this._topRadius-this._pBottomRadius),p=-this._height/2+h/this._pSegmentsH*this._height,l=0;l<=this._pSegmentsW;++l){if(g=l*C,c=f*Math.cos(g),u=f*Math.sin(g),this._yUp?(v=-p,x=u):(v=u,x=p),l>0&&(r[d++]=c,r[d++]=v,r[d++]=x,U[_++]=1,h>0)){var V=1==h?3-(6*(this._pSegmentsW-l)+12*l):3-12*this._pSegmentsW;r[d]=r[d+++V],r[d]=r[d+++V],r[d]=r[d+++V],r[d++]=c,r[d++]=v,r[d++]=x,U[_++]=1}l<this._pSegmentsW&&(r[d++]=c,r[d++]=v,r[d++]=x)}B.setPositions(r),B.setThickness(U)}},e.prototype._pBuildUVs=function(t,e){var i,r,s,o,a,l,h;if(e==n.ElementsType.TRIANGLE){var c=t;c.uvs&&this._numVertices==c.numVertices?c.invalidateVertices(c.uvs):c.setUVs(new Float32Array(2*this._numVertices)),l=c.uvs.get(this._numVertices),h=c.uvs.stride;var u=2*Math.PI/this._pSegmentsW,p=0;if(this._topClosed)for(l[p]=.5*this._scaleU,l[p+1]=.5*this._scaleV,p+=h,i=0;i<=this._pSegmentsW;++i)a=i*u,s=.5+.5*-Math.cos(a),o=.5+.5*Math.sin(a),l[p]=s*this._scaleU,l[p+1]=o*this._scaleV,p+=h;if(this._bottomClosed)for(l[p]=.5*this._scaleU,l[p+1]=.5*this._scaleV,p+=h,i=0;i<=this._pSegmentsW;++i)a=i*u,s=.5+.5*Math.cos(a),o=.5+.5*Math.sin(a),l[p]=s*this._scaleU,l[p+1]=o*this._scaleV,p+=h;if(this._surfaceClosed)for(r=0;r<=this._pSegmentsH;++r)for(i=0;i<=this._pSegmentsW;++i)l[p]=i/this._pSegmentsW*this._scaleU,l[p+1]=r/this._pSegmentsH*this._scaleV,p+=h}else n.ElementsType.LINE},e}(p),ee=function(t){function e(e,i,r,s,n,o,a,l){return void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=100),void 0===n&&(n=16),void 0===o&&(o=1),void 0===a&&(a=!0),void 0===l&&(l=!0),t.call(this,e,i,0,r,s,n,o,!1,a,!0,l)||this}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e}(te),ie=function(t){function e(e,i,r,s,n,o,a,l){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=100),void 0===n&&(n=1),void 0===o&&(o=1),void 0===a&&(a=!0),void 0===l&&(l=!1);var h=t.call(this,e,i)||this;return h._segmentsW=n,h._segmentsH=o,h._yUp=a,h._width=r,h._height=s,h._doubleSided=l,h}return l(e,t),Object.defineProperty(e.prototype,"segmentsW",{get:function(){return this._segmentsW},set:function(t){this._segmentsW=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsH",{get:function(){return this._segmentsH},set:function(t){this._segmentsH=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doubleSided",{get:function(){return this._doubleSided},set:function(t){this._doubleSided=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d=this._segmentsW+1;if(e==n.ElementsType.TRIANGLE){var _=t,f=(this._segmentsH+1)*d;this._doubleSided&&(f*=2),o=this._segmentsH*this._segmentsW*6,this._doubleSided&&(o*=2),null!=_.indices&&o==_.indices.length?_.invalidateIndices():(_.setIndices(new Uint16Array(o)),this._pInvalidateUVs()),i=_.indices.get(_.numElements),f==_.numVertices?(_.invalidateVertices(_.positions),_.invalidateVertices(_.normals),_.invalidateVertices(_.tangents)):(_.setPositions(new Float32Array(3*f)),_.setNormals(new Float32Array(3*f)),_.setTangents(new Float32Array(3*f)),this._pInvalidateUVs());var g=_.positions.get(f),m=_.normals.get(f),y=_.tangents.get(f);for(a=_.concatenatedBuffer.stride/4,c=0,h=0,p=0;p<=this._segmentsH;++p)for(u=0;u<=this._segmentsW;++u){if(r=(u/this._segmentsW-.5)*this._width,s=(p/this._segmentsH-.5)*this._height,g[h]=r,this._yUp?(g[h+1]=0,g[h+2]=s):(g[h+1]=s,g[h+2]=0),m[h]=0,this._yUp?(m[h+1]=1,m[h+2]=0):(m[h+1]=0,m[h+2]=-1),y[h]=1,y[h+1]=0,y[h+2]=0,h+=a,this._doubleSided){for(var b=h;b<h+3;++b)g[b]=g[b-3],m[b]=-m[b-3],y[b]=-y[b-3];h+=a}if(u!=this._segmentsW&&p!=this._segmentsH){l=u+p*d;var v=this._doubleSided?2:1;i[c++]=l*v,i[c++]=(l+d)*v,i[c++]=(l+d+1)*v,i[c++]=l*v,i[c++]=(l+d+1)*v,i[c++]=(l+1)*v,this._doubleSided&&(i[c++]=(l+d+1)*v+1,i[c++]=(l+d)*v+1,i[c++]=l*v+1,i[c++]=(l+1)*v+1,i[c++]=(l+d+1)*v+1,i[c++]=l*v+1)}}}else if(e==n.ElementsType.LINE){var x=t,w=this._segmentsH+1+d,E=this._width/2,A=this._height/2,D=(g=new Float32Array(6*w),new Float32Array(w));for(c=0,h=0,p=0;p<=this._segmentsH;++p)g[h++]=-E,g[h++]=0,g[h++]=p*this._height-A,g[h++]=E,g[h++]=0,g[h++]=p*this._height-A,D[c++]=1;for(u=0;u<=this._segmentsW;++u)g[h++]=u*this._width-E,g[h++]=0,g[h++]=-A,g[h++]=u*this._width-E,g[h++]=0,g[h++]=A,D[c++]=1;x.setPositions(g),x.setThickness(D)}},e.prototype._pBuildUVs=function(t,e){var i,r,s;if(e==n.ElementsType.TRIANGLE){s=(this._segmentsH+1)*(this._segmentsW+1),this._doubleSided&&(s*=2);var o=t;o.uvs&&s==o.numVertices?o.invalidateVertices(o.uvs):o.setUVs(new Float32Array(2*s)),i=o.uvs.get(s),r=o.uvs.stride;for(var a=0,l=0;l<=this._segmentsH;++l)for(var h=0;h<=this._segmentsW;++h)i[a]=h/this._segmentsW*this._scaleU,i[a+1]=(1-l/this._segmentsH)*this._scaleV,a+=r,this._doubleSided&&(i[a]=h/this._segmentsW*this._scaleU,i[a+1]=(1-l/this._segmentsH)*this._scaleV,a+=r)}else n.ElementsType.LINE},e}(p),re=function(t){function e(e,i,r,s,n){return void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=100),void 0===s&&(s=16),void 0===n&&(n=!0),t.call(this,e,i,r,0,0,s,1,!0,!1,!1,n)||this}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._pBottomRadius},set:function(t){this._pBottomRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sides",{get:function(){return this._pSegmentsW},set:function(t){this.setSegmentsW(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subdivisions",{get:function(){return this._pSegmentsH},set:function(t){this.setSegmentsH(t)},enumerable:!1,configurable:!0}),e}(te),se=function(t){function e(e,i,r,s,n,o,a){void 0===e&&(e=null),void 0===i&&(i="triangle"),void 0===r&&(r=50),void 0===s&&(s=50),void 0===n&&(n=16),void 0===o&&(o=8),void 0===a&&(a=!0);var l=t.call(this,e,i)||this;return l._numVertices=0,l._radius=r,l._tubeRadius=s,l._segmentsR=n,l._segmentsT=o,l._yUp=a,l}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tubeRadius",{get:function(){return this._tubeRadius},set:function(t){this._tubeRadius=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsR",{get:function(){return this._segmentsR},set:function(t){this._segmentsR=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentsT",{get:function(){return this._segmentsT},set:function(t){this._segmentsT=t,this._pInvalidatePrimitive(),this._pInvalidateUVs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yUp",{get:function(){return this._yUp},set:function(t){this._yUp=t,this._pInvalidatePrimitive()},enumerable:!1,configurable:!0}),e.prototype._pBuildGraphics=function(t,e){var i,r,s,o,a,l,h,c,u,p,d,_,f,g,m,y,b,v=0;if(e==n.ElementsType.TRIANGLE){var x=t;this._numVertices=(this._segmentsT+1)*(this._segmentsR+1),v=this._segmentsT*this._segmentsR*6,this._numVertices==x.numVertices?(x.invalidateIndices(),x.invalidateVertices(x.positions),x.invalidateVertices(x.normals),x.invalidateVertices(x.tangents)):(x.setIndices(new Uint16Array(v)),x.setPositions(new Float32Array(3*this._numVertices)),x.setNormals(new Float32Array(3*this._numVertices)),x.setTangents(new Float32Array(3*this._numVertices)),this._pInvalidateUVs()),i=x.indices.get(x.numElements),r=x.positions.get(this._numVertices),s=x.normals.get(this._numVertices),o=x.tangents.get(this._numVertices),a=x.concatenatedBuffer.stride/4,y=0,b=0;var w,E=2*Math.PI/this._segmentsR,A=2*Math.PI/this._segmentsT,D=void 0,T=void 0,S=void 0,C=void 0,P=void 0,I=void 0,O=0,N=0,L=void 0,M=void 0,F=void 0,k=void 0;for(h=0;h<=this._segmentsT;++h)for(O=y,l=0;l<=this._segmentsR;++l)g=l*E,m=h*A,d=(w=Math.cos(m))*Math.cos(g),_=w*Math.sin(g),f=Math.sin(m),c=this._radius*Math.cos(g)+this._tubeRadius*d,u=this._radius*Math.sin(g)+this._tubeRadius*_,p=h==this._segmentsT?0:this._tubeRadius*f,this._yUp?(P=-f,I=_,S=0,C=w?d/w:c/this._radius,D=-p,T=u):(P=_,I=f,S=w?d/w:c/this._radius,C=0,D=u,T=p),l==this._segmentsR?(r[y]=c,r[y+1]=r[O+1],r[y+2]=r[O+2]):(r[y]=c,r[y+1]=D,r[y+2]=T),s[y]=d,s[y+1]=P,s[y+2]=I,o[y]=-(w?_/w:u/this._radius),o[y+1]=S,o[y+2]=C,y+=a,l>0&&h>0&&(L=N,F=(M=N-1)-this._segmentsR-1,k=L-this._segmentsR-1,i[b++]=L,i[b++]=M,i[b++]=F,i[b++]=L,i[b++]=F,i[b++]=k),N++}else n.ElementsType.LINE},e.prototype._pBuildUVs=function(t,e){var i,r,s,o;if(e==n.ElementsType.TRIANGLE){var a=t;a.uvs&&this._numVertices==a.numVertices?a.invalidateVertices(a.uvs):a.setUVs(new Float32Array(2*this._numVertices)),s=a.uvs.get(this._numVertices),o=a.uvs.stride;var l=0;for(r=0;r<=this._segmentsT;++r)for(i=0;i<=this._segmentsR;++i)s[l]=i/this._segmentsR*this._scaleU,s[l+1]=r/this._segmentsT*this._scaleV,l+=o}else n.ElementsType.LINE},e}(p),ne=function(){function t(){}return t.ADVANCED="advanced",t.NORMAL="normal",t}(),oe=function(t){function s(i){var s=t.call(this,i)||this,o=new e.PerspectiveProjection;return o.coordinateSystem=e.CoordinateSystem.RIGHT_HANDED,o.originX=-1,o.originY=1,o.transform=new e.Transform,o.transform.moveTo(0,0,-1e3),o.transform.lookAt(new e.Vector3D),s._view=new r.View(o,s._stage),s._root=new m,s._renderer=n.RenderGroup.getInstance(n.DefaultRenderer).getRenderer(s._view,s._root.getNode(s._root)),s._renderer.view.projection=o,s._renderer.renderableSorter=null,s}return l(s,t),s.prototype.generate=function(t,e,r,s){var n,o,a=[];for(var l in t.font_styles)for(var h=t.font_styles[l].generateFNTTextures(s,r,e),c=0;c<h.length;c++){o=e;var u=new y;u.graphics.addShape(h[c]),this._root.removeChildren(0,this._root.numChildren),this._root.addChild(u),this._renderer.view.projection.scale=1e3/e;var p=0,d=1==this._stage.glVersion?2*e:e;for(n=new i.BitmapImage2D(d,d,!0,0,!0),a.push(n),t.font_styles[l].addFNTChannel(n);o>=1&&(this._view.backgroundAlpha=0,this._view.backgroundColor=0,this._view.target=n,this._renderer.render(!0,0,p),1!=this._stage.glVersion);)o*=.5,p++}return a},s}($),ae=function(){function t(){}return t.NONE="none",t.PIXEL="pixel",t.SUBPIXEL="subpixel",t}(),le=function(){function t(){}return t.NORMAL="normal",t.SELECTION="selection",t}(),he=function(){function t(t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!1),this._keepMaterial=t,this._disposeSources=e,this._objectSpace=i}return Object.defineProperty(t.prototype,"disposeSources",{get:function(){return this._disposeSources},set:function(t){this._disposeSources=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepMaterial",{get:function(){return this._keepMaterial},set:function(t){this._keepMaterial=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"objectSpace",{get:function(){return this._objectSpace},set:function(t){this._objectSpace=t},enumerable:!1,configurable:!0}),t.prototype.applyToContainer=function(t,e){this.reset(),this.parseContainer(t,e),this.collect(t,!1),this.merge(t,this._disposeSources)},t.prototype.applyToSprites=function(t,e){if(this.reset(),e.length){for(var i=0;i<e.length;i++)e[i]!=t&&this.collect(e[i],this._disposeSources);this.collect(t,!1),this.merge(t,this._disposeSources)}},t.prototype.apply=function(t,e){this.reset(),this.collect(e,this._disposeSources),this.collect(t,!1),this.merge(t,this._disposeSources)},t.prototype.reset=function(){this._toDispose=new Array,this._shapeVOs=new Array},t.prototype.merge=function(t,e){var r,o=t.graphics,a=this._shapeVOs.length>1;for(r=0;r<this._shapeVOs.length;r++){var l=new n.TriangleElements(new i.AttributesBuffer);l.autoDeriveNormals=!1,l.autoDeriveTangents=!1;var h=this._shapeVOs[r];l.setIndices(h.indices),l.setPositions(h.vertices),l.setNormals(h.normals),l.setTangents(h.tangents),l.setUVs(h.uvs),this._keepMaterial&&a?o.addShape(s.Shape.getShape(l,h.material)):o.addShape(s.Shape.getShape(l))}if(this._keepMaterial&&!a&&this._shapeVOs.length&&(t.material=this._shapeVOs[0].material),e)for(var c=this._toDispose.length;r<c;r++)this._toDispose[r].dispose();this._toDispose=null},t.prototype.collect=function(t,e){var i,r;for(i=0;i<t.graphics.count;i++){var s=void 0,n=void 0,o=void 0,a=void 0,l=void 0,h=void 0,c=t.graphics.getShapeAt(i).elements,u=this.getShapeData(t.graphics.getShapeAt(i).material),p=this._objectSpace?u.vertices:[],d=this._objectSpace?u.normals:[],_=this._objectSpace?u.tangents:[];a=p.length,l=d.length,h=_.length;var f=u.uvs.length;this.copyAttributes(c.positions,p,c.numVertices,a),this.copyAttributes(c.normals,d,c.numVertices,l),this.copyAttributes(c.tangents,_,c.numVertices,h),this.copyAttributes(c.uvs,u.uvs,c.numVertices,f);var g=this._objectSpace?0:u.vertices.length/3;o=u.indices.length,n=c.numElements;var m=c.indices.get(n);for(s=0;s<n;s++)r=3*s,u.indices[o++]=m[r]+g,u.indices[o++]=m[r+1]+g,u.indices[o++]=m[r+2]+g;if(!this._objectSpace)for(t.transform.matrix3D.transformVectors(p,p),t.transform.matrix3D.deltaTransformVectors(d,d),t.transform.matrix3D.deltaTransformVectors(_,_),a=u.vertices.length,l=u.normals.length,h=u.tangents.length,n=p.length,s=0;s<n;s++)u.vertices[a++]=p[s],u.normals[l++]=d[s],u.tangents[h++]=_[s]}e&&this._toDispose.push(t)},t.prototype.copyAttributes=function(t,e,i,r){for(var s=t.get(i),n=t.dimensions,o=t.stride,a=i*o,l=0;l<a;l+=o)for(var h=0;h<n;h++)e[r++]=s[l+h]},t.prototype.getShapeData=function(t){var e;if(this._keepMaterial){var i=void 0,r=this._shapeVOs.length;for(i=0;i<r;i++)if(this._shapeVOs[i].material==t){e=this._shapeVOs[i];break}}else this._shapeVOs.length&&(e=this._shapeVOs[0]);return e||((e=new ce).vertices=new Array,e.normals=new Array,e.tangents=new Array,e.uvs=new Array,e.indices=new Array,e.material=t,this._shapeVOs.push(e)),e},t.prototype.parseContainer=function(t,e){var i,r;for(e instanceof y&&e!=t&&this.collect(e,this._disposeSources),r=0;r<e.numChildren;++r)i=e.getChildAt(r),this.parseContainer(t,i)},t}(),ce=function(){},ue=function(){function t(){}return t.string=function(t){return"function"==typeof t&&(t=new t),t},t.byteArray=function(t){return"function"==typeof t&&(t=new t),e.ByteArray,t},t.isHex=function(t){for(var e=t.length,i=0;i<e;++i)if(-1==this._hexChars.indexOf(t.charAt(i)))return!1;return!0},t.tryColor=function(t){if("number"==typeof t)return Math.floor(t);if("string"==typeof t){if("random"==t)return Math.floor(16777216*Math.random());if(null==this._colorNames&&(this._colorNames=new Object,this._colorNames.steelblue=4620980,this._colorNames.royalblue=267920,this._colorNames.cornflowerblue=6591981,this._colorNames.lightsteelblue=11584734,this._colorNames.mediumslateblue=8087790,this._colorNames.slateblue=6970061,this._colorNames.darkslateblue=4734347,this._colorNames.midnightblue=1644912,this._colorNames.navy=128,this._colorNames.darkblue=139,this._colorNames.mediumblue=205,this._colorNames.blue=255,this._colorNames.dodgerblue=2003199,this._colorNames.deepskyblue=49151,this._colorNames.lightskyblue=8900346,this._colorNames.skyblue=8900331,this._colorNames.lightblue=11393254,this._colorNames.powderblue=11591910,this._colorNames.azure=15794175,this._colorNames.lightcyan=14745599,this._colorNames.paleturquoise=11529966,this._colorNames.mediumturquoise=4772300,this._colorNames.lightseagreen=2142890,this._colorNames.darkcyan=35723,this._colorNames.teal=32896,this._colorNames.cadetblue=6266528,this._colorNames.darkturquoise=52945,this._colorNames.aqua=65535,this._colorNames.cyan=65535,this._colorNames.turquoise=4251856,this._colorNames.aquamarine=8388564,this._colorNames.mediumaquamarine=6737322,this._colorNames.darkseagreen=9419919,this._colorNames.mediumseagreen=3978097,this._colorNames.seagreen=3050327,this._colorNames.darkgreen=25600,this._colorNames.green=32768,this._colorNames.forestgreen=2263842,this._colorNames.limegreen=3329330,this._colorNames.lime=65280,this._colorNames.chartreuse=8388352,this._colorNames.lawngreen=8190976,this._colorNames.greenyellow=11403055,this._colorNames.yellowgreen=10145074,this._colorNames.palegreen=10025880,this._colorNames.lightgreen=9498256,this._colorNames.springgreen=65407,this._colorNames.mediumspringgreen=64154,this._colorNames.darkolivegreen=5597999,this._colorNames.olivedrab=7048739,this._colorNames.olive=8421376,this._colorNames.darkkhaki=12433259,this._colorNames.darkgoldenrod=12092939,this._colorNames.goldenrod=14329120,this._colorNames.gold=16766720,this._colorNames.yellow=16776960,this._colorNames.khaki=15787660,this._colorNames.palegoldenrod=15657130,this._colorNames.blanchedalmond=16772045,this._colorNames.moccasin=16770229,this._colorNames.wheat=16113331,this._colorNames.navajowhite=16768685,this._colorNames.burlywood=14596231,this._colorNames.tan=13808780,this._colorNames.rosybrown=12357519,this._colorNames.sienna=10506797,this._colorNames.saddlebrown=9127187,this._colorNames.chocolate=13789470,this._colorNames.peru=13468991,this._colorNames.sandybrown=16032864,this._colorNames.darkred=9109504,this._colorNames.maroon=8388608,this._colorNames.brown=10824234,this._colorNames.firebrick=11674146,this._colorNames.indianred=13458524,this._colorNames.lightcoral=15761536,this._colorNames.salmon=16416882,this._colorNames.darksalmon=15308410,this._colorNames.lightsalmon=16752762,this._colorNames.coral=16744272,this._colorNames.tomato=16737095,this._colorNames.darkorange=16747520,this._colorNames.orange=16753920,this._colorNames.orangered=16729344,this._colorNames.crimson=14423100,this._colorNames.red=16711680,this._colorNames.deeppink=16716947,this._colorNames.fuchsia=16711935,this._colorNames.magenta=16711935,this._colorNames.hotpink=16738740,this._colorNames.lightpink=16758465,this._colorNames.pink=16761035,this._colorNames.palevioletred=14381203,this._colorNames.mediumvioletred=13047173,this._colorNames.purple=8388736,this._colorNames.darkmagenta=9109643,this._colorNames.mediumpurple=9662683,this._colorNames.blueviolet=9055202,this._colorNames.indigo=4915330,this._colorNames.darkviolet=9699539,this._colorNames.darkorchid=10040012,this._colorNames.mediumorchid=12211667,this._colorNames.orchid=14315734,this._colorNames.violet=15631086,this._colorNames.plum=14524637,this._colorNames.thistle=14204888,this._colorNames.lavender=15132410,this._colorNames.ghostwhite=16316671,this._colorNames.aliceblue=15792383,this._colorNames.mintcream=16121850,this._colorNames.honeydew=15794160,this._colorNames.lightgoldenrodyellow=16448210,this._colorNames.lemonchiffon=16775885,this._colorNames.cornsilk=16775388,this._colorNames.lightyellow=16777184,this._colorNames.ivory=16777200,this._colorNames.floralwhite=16775920,this._colorNames.linen=16445670,this._colorNames.oldlace=16643558,this._colorNames.antiquewhite=16444375,this._colorNames.bisque=16770244,this._colorNames.peachpuff=16767673,this._colorNames.papayawhip=16773077,this._colorNames.beige=16119260,this._colorNames.seashell=16774638,this._colorNames.lavenderblush=16773365,this._colorNames.mistyrose=16770273,this._colorNames.snow=16775930,this._colorNames.white=16777215,this._colorNames.whitesmoke=16119285,this._colorNames.gainsboro=14474460,this._colorNames.lightgrey=13882323,this._colorNames.silver=12632256,this._colorNames.darkgrey=11119017,this._colorNames.grey=8421504,this._colorNames.lightslategrey=7833753,this._colorNames.slategrey=7372944,this._colorNames.dimgrey=6908265,this._colorNames.darkslategrey=3100495,this._colorNames.black=0,this._colorNames.transparent=4278190080),null!=this._colorNames[t])return this._colorNames[t];if(6==t.length&&this.isHex(t))return parseInt("0x"+t)}return null},t.color=function(t){var e=this.tryColor(t);if(null==e)throw new Gt("Can't cast to color: "+t);return e},t.tryClass=function(t){if(this._notClasses[t])return t;var e=this._classes[t];if(null!=e)return e;try{return e=window[t],this._classes[t]=e,e}catch(t){}return this._notClasses[t]=!0,t},t.image2D=function(t){if(null==t)return null;if("string"==typeof t&&(t=this.tryClass(t)),"function"==typeof t)try{t=new t}catch(e){t=new t(0,0)}if(t instanceof i.Image2D)return t;throw t instanceof n.ImageTexture2D&&(t=t.image),new Gt("Can't cast to BitmapImage2D: "+t)},t.bitmapTexture=function(e){if(null==e)return null;if("string"==typeof e&&(e=this.tryClass(e)),"function"==typeof e)try{e=new e}catch(t){e=new e(0,0)}if(e instanceof n.ImageTexture2D)return e;try{var i=t.image2D(e);return new n.ImageTexture2D(i)}catch(t){}throw new Gt("Can't cast to ImageTexture2D: "+e)},t._hexChars="0123456789abcdefABCDEF",t._notClasses=new Object,t._classes=new Object,t}(),pe=function(){function t(t,e,i,s){void 0===t&&(t=null),void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=null);var o=this;this._time=0,this._deltaTime=0,this._onProjectionChangedDelegate=function(t){return o._onProjectionChanged(t)},this._rendererClass=s||n.DefaultRenderer,this.view=i||new r.View,this._pickPool=r.PickGroup.getPool(this.view),this.container=t||new m,this.camera=e||new N}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},set:function(t){this._container!=t&&(this._mousePicker&&this._mouseManager.unregisterPicker(this._mousePicker),this._container=t,this._node=this._container.getNode(this._container),this._mousePicker=this._pickPool.getRaycastPicker(this._node),this._tabPicker=this._pickPool.getTabPicker(this._node),this._mousePicker.findClosestCollision=!0,this._mouseManager.registerPicker(this._mousePicker),this._camera&&(this._camera.clear(),this._node.invalidate()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},set:function(t){this._view!=t&&(this._view&&(this._renderer&&(this._renderer.clear(),this._renderer=null),this._mousePicker&&this._mouseManager.unregisterPicker(this._mousePicker)),this._view=t,this._mouseManager=Jt.getInstance(this._view.stage),this._mousePicker&&this._mouseManager.registerPicker(this._mousePicker),this._camera&&(this._view.projection=this._camera.projection))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this._renderer||(this._renderer=n.RenderGroup.getInstance(this._rendererClass).getRenderer(this.view,this._node)),this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseX",{get:function(){return this._mouseX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseY",{get:function(){return this._mouseY},enumerable:!1,configurable:!0}),t.prototype.getLocalMouseX=function(t){return t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).x},t.prototype.getLocalMouseY=function(t){return t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.screenX,this._view.stage.screenY,1e3)).y},t.prototype.getLocalTouchPoints=function(t){for(var e,r=new Array,s=this._view.stage.touchPoints.length,n=0;n<s;n++)e=t.getInverseMatrix3D().transformVector(this._view.unproject(this._view.stage.touchPoints[n].x,this._view.stage.touchPoints[n].y,1e3)),r.push(new i.TouchPoint(e.x,e.y,this._view.stage.touchPoints[n].id));return r},Object.defineProperty(t.prototype,"rendererClass",{get:function(){return this._rendererClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rendererType",{set:function(t){this._rendererClass!=t&&(this._renderer&&(this._renderer.clear(),this._renderer=null),this._rendererClass=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"camera",{get:function(){return this._camera},set:function(t){this._camera!=t&&(this._camera&&(this._camera.clear(),this._camera.removeEventListener(O.PROJECTION_CHANGED,this._onProjectionChangedDelegate)),this._camera=t,this._camera.addEventListener(O.PROJECTION_CHANGED,this._onProjectionChangedDelegate),this._view&&(this._view.projection=this._camera.projection),this._node.invalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this._deltaTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mouseManager",{get:function(){return this._mouseManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mousePicker",{get:function(){return this._mousePicker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabPicker",{get:function(){return this._tabPicker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFacesCount",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.fireMouseEvents=function(){this.disableMouseEvents||this._mouseManager.fireMouseEvents(this._mousePicker)},t.prototype.render=function(t){void 0===t&&(t=!0),this._updateTime(),t&&!this.disableMouseEvents&&this._mouseManager.fireMouseEvents(this._mousePicker),this.beforeRenderCallback&&this.beforeRenderCallback(),this.renderer.render()},t.prototype._updateTime=function(){var t=e.getTimer();0==this._time&&(this._time=t),this._deltaTime=t-this._time,this._time=t},t.prototype.dispose=function(){this._renderer&&(this._renderer.clear(),this._renderer=null),this._mouseManager.dispose(),this._mouseManager=null},t.prototype._onProjectionChanged=function(t){this._view.projection=this._camera.projection},t}();s.MaterialManager.materialClass=o.MethodMaterial,console.debug("AwayJS - Scene - 0.13.327"),t.AntiAliasType=ne,t.Billboard=C,t.BitmapFontChar=nt,t.BitmapFontTable=ot,t.Camera=N,t.CameraEvent=O,t.Cast=ue,t.CastError=Gt,t.ControllerBase=w,t.DefaultFontManager=ct,t.DefaultSceneGraphFactory=Xt,t.DeviceFontManager=lt,t.DisplayObject=g,t.DisplayObjectContainer=m,t.FNTGenerator=oe,t.FirstPersonController=E,t.FocusEvent=zt,t.FollowController=T,t.Font=at,t.FrameScriptManager=R,t.GridFitType=ae,t.HTMLTextProcessor=Ut,t.HoverController=D,t.KeyboardEvent=ft,t.LineSegment=L,t.LoaderContainer=k,t.LookAtController=A,t.Merge=he,t.MorphSprite=b,t.MouseEvent=q,t.MouseManager=Jt,t.MovieClip=U,t.PrefabBase=u,t.PrimitiveCapsulePrefab=$t,t.PrimitiveConePrefab=ee,t.PrimitiveCubePrefab=d,t.PrimitiveCylinderPrefab=te,t.PrimitivePlanePrefab=ie,t.PrimitivePolygonPrefab=re,t.PrimitivePrefabBase=p,t.PrimitiveSpherePrefab=_,t.PrimitiveTorusPrefab=se,t.ResizeEvent=Yt,t.Scene=pe,t.SceneImage2D=Zt,t.Settings=f,t.SimpleButton=V,t.Skybox=z,t.SkyboxElements=j,t.SpringController=S,t.Sprite=y,t.TesselatedFontChar=Q,t.TesselatedFontTable=st,t.TextField=Ht,t.TextFieldAutoSize=K,t.TextFieldType=Z,t.TextFormat=dt,t.TextFormatAlign=J,t.TextInteractionMode=le,t.TextLineMetrics=_t,t.TextSprite=mt,t.TextfieldEvent=gt,t.Timeline=x,t.TouchEvent=Wt,t._Render_Billboard=P,t._Render_LineSegment=M,t._Render_Skybox=Y,t._Render_SkyboxElements=H,t._Render_SkyboxMaterial=W,t._Stage_SkyboxElements=G,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
4
4
|
//# sourceMappingURL=awayjs-scene.umd.js.map
|